SVGHandles89_v100

hh hh at hyperhh.de
Sun Sep 2 18:49:18 EDT 2018


Just uploaded SVGHandles to "Sample Stacks".

This is a group of handles that is attachable to a SVG display.
All you have to do (after copying the group to your stack):

send "setTarget <fieldName>" to group "hhSVGPoly"

The field's name will usually end with ".svg" and contain any
valid SVG source. The stack contains several examples.

Base position of the 9 handles (use a monospaced font):
   #######################
   ##         1         ##
   ##         |         ##
   ## 9 ----- 2 ----- 3 ##
   ## |               | ##
   ## 8               4 ##
   ## |               | ##
   ## 7 ----- 6 ----- 5 ##
   #######################
Actions yield Affine Transformations:
a=Click and drag, b=Shift-Click or RightClick and drag

1: (a) Rotate, (b) Reset shape
2,6: (a) Height, (b) SkewX
4,8: (a) Width,  (b) SkewY
3,5,7,9: ProportionalResize

4-point-distortion isn't (directly) available in SVG and some
work arounds yield jagged raster displays for curved shapes.
That's why we made 'only' affine transformations available.

Rotation is around the shapes's loc (which can also be shown).

Changing height, width or proportional resizing preserves the
current shape!

SVGHandles works on Mac/Win/Linux with LC 8/9 and uses JavaScript
(of a browser widget) for converting and antialiasing the SVG to
the raster display.

Download SVGHandles89_v100 from "Sample Stacks" or
http://livecodeshare.runrev.com/stack/896





More information about the use-livecode mailing list