User:Lupo/svgtest

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Rotation

[edit]

Can we write wiki code to overlap and center two SVGs, the top one being rotated? Background image here is File:Bronze circle.svg, the overlaid arrow is File:North Pointer.svg.

  • This is a test.
  • This is a test.
  • This is another test.
  • This is yet another test.
  • And again a test.

Hmmm... Centering is not perfect yet. I think the problem here is that File:North Pointer.svg has a couple of empty pixel rows at the bottom. With a square pointer image not having extra pixels around it, this might work. (Tested only in FF26.) If the automatic alignment doesn't work, Module:Coordinates should be able to compute absolute offsets for top/left of the bounding box of the (rotated) overlay and generate those directly. Lupo 17:14, 8 January 2014 (UTC)