Anti-nuisance lawsuit warning: The purpose of these notes is to remind me, Zoegond, of stuff or to help me work stuff out. They may contain mistakes.

Quick

  • ($a, $b....) = unpack("A2A7...", $packed)
  • push( array, list )

Monday, February 15, 2010

Markers

(For our purposes the 'vertex' is the point being marked - the line start, end or vertex depending on what kind of marker we are defining.)

markerwidth and markerheight give the actual size of the space that the marker is fitted into. The unit is (by default) the stroke-width of the line being marked. How this space is positioned relative to the vertex depends on the position of refx, refy relative to the viewbox origin - see below.

viewbox="minx miny width height" establishes a coordinate grid - the stuff you draw as the marker has its co-ordinates expressed in terms of the viewbox. Eg if box is "0 0 10 10" then you are saying 'Divide the marker space into a grid with width 10, height 10, and let its top left-hand corner have the co-ord 0,0.'

refx,refy establish the co-ords of the vertex in terms of the viewbox. Eg with refx="5" and refy="5", you are saying 'Let the vertex have the co-ords 5,5 in our system', which with the viewbox above would put the vertex in the middle.

(This is all a matter of convention: if the viewbox size, refx and refy, and the dimensions of the marker components are all increased by the same proportion, the result is exactly the same. The idea, I suppose, is that you can use whatever co-ord system you find most useful.)

Btw orient="auto" is not the default. You should specify "auto" if you want something like an arrowhead to point in the same direction that the line does.

Followers

Blog Archive