Sketch appears to miscalculate the BBox when special is used

21 views
Skip to first unread message

Olumide

unread,
Sep 26, 2011, 8:43:21 AM9/26/11
to Sketch Users
In the following bit of sample code, Sketch appears to miscalculate
the BBox when a \special is used (with \uput). Is this a bug or am I
doing something wrong as usual.

Thanks,

- Olumide

######################################################3

# objects
polygon[lay=over,fillcolor=gray,linewidth=0.20mm]( 9.038439,
-1.160410, -1.564528 )( 9.292715, -1.911034, -1.564528

)( 9.418256, -0.985601, -1.564528 )

line[lay=over,linestyle=dashed,linewidth=0.14mm,dash=0.5mm 0.5mm]
(2.192737,-1.243889,-1.571514)(10.672301,-1.243889,-1.571512)

line[lay=over,linewidth=0.1mm,linecolor=black]
(7.960481,-0.975145,-1.564529)(7.960481,-1.243889,-1.564529)

line[lay=over,linewidth=0.1mm,linecolor=red](2.196020, -1.240496,
-1.564528)(9.005589, -0.720910, -1.564528)
line[lay=over,linewidth=0.1mm,linecolor=red](2.196020, -1.240496,
-1.564528)(9.020943, -0.926330, -1.564528)
line[lay=over,linecolor=red](9.005589, -0.720910, -1.564528)(9.020943,
-0.926330, -1.564528)

# special (BBox is correctly calculated when no specials are used)
special | \newcommand{\verysmall}{\fontsize{2}{2pt}\selectfont} |
special |\verysmall
\uput{0.5mm}[180]#1{$l$}
\uput{1.5mm}[160]#2{$v$}
|(7.960481,-1.12,-1.564529)(7.960481,-0.975145,-1.564529)

Gene Ressler

unread,
Sep 26, 2011, 3:29:54 PM9/26/11
to sketch...@googlegroups.com
Sketch has no way at all to determine the size of a special.  It considers each special to be located entirely at (the transformed version) of the first argument point.  The workaround for the problems this can cause with bounding boxes is to include a blank special with a point argument where you need it.  If there are better ideas out there, I'm happy to listen.
 
Gene

--
You received this message because you are subscribed to the Google Groups "Sketch Users" group.
To post to this group, send email to sketch...@googlegroups.com.
To unsubscribe from this group, send email to sketch-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sketch-users?hl=en.




--
Gene Ressler
Reply all
Reply to author
Forward
0 new messages