metapost

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
metapost [2019/06/02 23:13] – [Symbol Sizing and Positioning] clarify symbol parameter indicator brucemuttonmetapost [2019/06/02 23:35] – [Symbol Sizing and Positioning] clarify symbol parameter indicator brucemutton
Line 121: Line 121:
 Here it is inserted into an electric light symbol definition.  The code is between the lines with % % %.  It creates a green insertion point, a red origin point that represents the (0u, 0u) origin of the symbol, a light blue rectangle that represents the loci of the alignment options (left, top-left etc), and a grey unit symbol size. Note that this code requires that T:= ... rotated BEFORE aligned.  If your symbol uses T:= ... aligned BEFORE rotated, then the code needs to be modified slightly.   Here it is inserted into an electric light symbol definition.  The code is between the lines with % % %.  It creates a green insertion point, a red origin point that represents the (0u, 0u) origin of the symbol, a light blue rectangle that represents the loci of the alignment options (left, top-left etc), and a grey unit symbol size. Note that this code requires that T:= ... rotated BEFORE aligned.  If your symbol uses T:= ... aligned BEFORE rotated, then the code needs to be modified slightly.  
  
-After writing the code, I realised that this symbol was in fact larger than 0.7u in the y direction, therefore the U: variable is not tall enough, the symbol is not centered around around its (0u,0u) coordinates and it is just a bit (but probably acceptably) larger than u in size!+After writing the code, I realised that this symbol was in fact larger than 0.7u in the y direction, therefore the U: variable is not tall enough, the symbol is not centered around around its (0u,0u) coordinates (which might be OK if you want the space below the luminaire to be part of the 'symbol'and it is just a bit (but probably acceptably) larger than u in size!
  
 <code> <code>
Line 159: Line 159:
  
  
-Here is an example with the above point symbol that has been redefined with three different U: settings, and inserted with ''-align top-right'' On the left, U:=(1.0u, 1.0u) [U/u=1.4], in the centre, U:=(0.7u, 0.7u) [U/u=1.0], on the right, U:=(0.5u, 0.5u) [U/u= 0.7].  Notice that the alignment, top-right, is relative to the local coordinate system in the scrap, not to the output page coordinate system.+Here is an example with the above point symbol that has been redefined with three different U: settings, and inserted with ''-align top-right'' On the left, U:=(1.0u, 1.0u) [U/u=1.4], in the centre, U:=(0.7u, 0.7u) [U/u=1.0], on the right, U:=(0.5u, 0.5u) [U/u= 0.7].  Note that the alignment, top-right, is relative to the local coordinate system in the scrap, not necessarily to the output page coordinate system.  In these examples it does match the output page orientation, because the scrap has 'north up'.
  
 {{:metapost:symbol0.7x0.7alignedtr-u1_7_5.png?400|}} {{:metapost:symbol0.7x0.7alignedtr-u1_7_5.png?400|}}
  • metapost.txt
  • Last modified: 2 years ago
  • by tarquinwj