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 revisionBoth sides next revision
metapost [2019/06/02 05:44] – [Symbol Sizing and Positioning] brucemuttonmetapost [2019/06/02 22:55] – [Symbol Sizing and Positioning] add u box to symbol parameter indicator code brucemutton
Line 128: Line 128:
       T:=identity rotated theta aligned al scaled defaultscale shifted pos; %corrected to rotate THEN align       T:=identity rotated theta aligned al scaled defaultscale shifted pos; %corrected to rotate THEN align
              
-      % % %  SYMBOL PARAMETER INDICATOR (origin, insertion, alignment loci+      % % %  SYMBOL PARAMETER INDICATOR (origin, insertion, alignment box, u box
-   % before use you need to correctly assign the parsed variable aliases in the next two rows from th edef statement above+      Placing this code directly after T:= identity line will put the indicators under the symbol 
 +      % Placing this code immediately before enddef will put the indicators over top of the symbol 
 +      % Before use you need to correctly assign the parsed variable aliases in the next two rows from the def statement above
    rotation:= theta;               %set this to the third parsed variable (ie theta)    rotation:= theta;               %set this to the third parsed variable (ie theta)
    pair alignment; alignment:= al; %set this to the last parsed variable (ie al)    pair alignment; alignment:= al; %set this to the last parsed variable (ie al)
-      thdraw fullcircle scaled 0.15u withpen PenD withcolor red; %uncomment to show symbol origin, (0,0) +    
-      thdraw fullcircle shifted -(xpart alignment * xpart U, ypart alignment * ypart U) rotated -rotation withpen PenD withcolor green;  %uncomment to show symbol insertion point, (0,0)  +      % show symbol origin, (0,0) red 
-   q:= (xpart U, -ypart U) -- (xpart U, ypart U) -- (-xpart U, ypart U) -- (-xpart U, -ypart U) -- cycle; +          thdraw fullcircle scaled 0.15u withpen PenD withcolor red; 
-   thdraw q shifted -(xpart alignment * xpart U, ypart alignment * ypart U) rotated -rotation withpen PenD withcolor 0.5blue+0.5white;  %uncomment to show U alignment box   +      % show symbol insertion point, (0,0) green 
 +          thdraw fullcircle shifted -(xpart alignment * xpart U, ypart alignment * ypart U) rotated -rotation withpen PenD withcolor green;  
 +      % show U alignment box light blue 
 +          q:= (xpart U, -ypart U) -- (xpart U, ypart U) -- (-xpart U, ypart U) -- (-xpart U, -ypart U) -- cycle; 
 +          thdraw q shifted -(xpart alignment * xpart U, ypart alignment * ypart U) rotated -rotation withpen PenD withcolor 0.5blue+0.5white; 
 +      % show box grey 
 +          thdraw unitsquare scaled u shifted (-0.5u, -0.5u) withpen PenD withcolor 0.1black+0.5white;
       % % %       % % %
        
  • metapost.txt
  • Last modified: 2 years ago
  • by tarquinwj