Welcome Guest (Log in)

SVGHandles89_v107

StarStarStarStarStar
LC 8+9 (18) | Image (14) | SVG (13) | Affine transforms (3)
General
Expander triangle
  • Author
  • Rating
  • Type
  • Revision
  • Downloaded
  • Updated
  • Hermann Hoch
  • StarStarStarStarStar
  • Stack
  • 7
  • 277 Times
  • 19 September 2018
SVGHandles89_v107
## v1.0.7 Sep 19, 2018 ... proportional resizing is now correct
## v1.0.5 Sep 06, 2018 ... adjusted actions (handles 2,4,6,8)
## v1.0.2 Sep 03, 2018 ... added cropForExport to options
## v1.0.0 Sep 03, 2018 ... First version on LiveCodeShare

SVGHandles is a group of handles that is attachable to a SVG display.

All you have to do (after copying the group to your stack):

put "carousel.svg" into fieldName -- for example
send "setTarget fieldName" to group "hhSVGPoly"

FieldName is the field's short name, will usually end with ".svg".
The field contains any valid SVG source. The stack has several examples.

Base position of the 9 handles: 1: Top, 2: TopMidth,
3: TopRight, 4: MidRight, 5: BotRight, 6: BotMidth
7: BotLeft, 8: MidLeft, 9: TopLeft

Click actions yield *Affine Transformations*:
a=Click, b=Shift-Click or RightClick

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

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 and is by that very fast.
Ajax Loader
Tags
Expander triangle
User Comments
Expander triangle