Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revisionBoth sides next revision | ||
metapost [2019/06/02 05:44] – [Symbol Sizing and Positioning] brucemutton | metapost [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 | + | % % % SYMBOL PARAMETER INDICATOR (origin, insertion, alignment |
- | | + | % Placing this code directly after T:= identity line will put the indicators under the symbol |
+ | % Placing this code immediately | ||
+ | % Before | ||
rotation:= theta; | rotation:= 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 shifted -(xpart alignment * xpart U, ypart alignment * ypart U) rotated -rotation withpen PenD withcolor green; | + | % show symbol origin, (0,0) red |
- | | + | |
- | | + | |
+ | thdraw fullcircle shifted -(xpart alignment * xpart U, ypart alignment * ypart U) rotated -rotation withpen PenD withcolor green; | ||
+ | | ||
+ | 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; | ||
+ | | ||
+ | thdraw unitsquare scaled u shifted (-0.5u, -0.5u) withpen PenD withcolor 0.1black+0.5white; | ||
% % % | % % % | ||
| |