Rotating Widgets Resizing
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Rotating Widgets Resizing
This is a right pox. The "beetle" (SVG widget) should NOT resize when rotated.
Oh, and before you ask; the widget is not locked.
- Attachments
-
- Robot.livecode.zip
- Here's the stack.
- (14.58 KiB) Downloaded 159 times
Last edited by richmond62 on Mon Apr 22, 2019 9:06 pm, edited 1 time in total.
Re: Rotating Widgets Resizing
I'm curious why you think it would not resize as any graphic would? Being an svg graphic isn't going to change that behavior.

-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Rotating Widgets Resizing
Because if one rotates a bitmap (apart from the fact that it goes "all hairy round the edges")
it does not resize.
it does not resize.
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Rotating Widgets Resizing
Here's a sort of comparison stack.
The beetle on the left is an SVG Widget.
The beetle in the middle is a PNG image.
The beetle on the right is not a beetle at all, it is a rectangular graphic
and the 8 buttons change its backGroundPattern.
Note the hairy legs on the central beetle.
- Attachments
-
- Robot.livecode.zip
- Here's the stack.
- (96.38 KiB) Downloaded 152 times
Re: Rotating Widgets Resizing
Too new for me to run apparently (went as far up the chain as 8.x).
When I suggested turning on the borders before rotating a bmp, it was because I had done just that, the bmp resizes just the same as any other graphic I've seen, so I still don't know why you would not expect that from the svg.
When I suggested turning on the borders before rotating a bmp, it was because I had done just that, the bmp resizes just the same as any other graphic I've seen, so I still don't know why you would not expect that from the svg.

-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Rotating Widgets Resizing
Just for you, darling . . .Too new for me to run apparently
-
Re: Rotating Widgets Resizing
Thanks, it did allow me to experiment some. I put a border around the image (middle one), and started turning it and, as expected, it resizes.
The only difference is on how they resize, the svg resizes towards the center, where as the image file resized the edges. I'm not positive how background images resize, but I am pretty sure they do, probably outward as the image does.
Re: Rotating Widgets Resizing
To summarize several threads about rotating the SVG widget.
The widget does NEVER resize if you change the angle of the widget. This is NOT implemented.
You can see this by looking at the LCB code or, simpler, by changing the angle from the property inspector in pointer mode.
But if you have the boundingBox of the SVG path you can compute the widget size needed for a certain rotation of the path.
The widget does NEVER resize if you change the angle of the widget. This is NOT implemented.
You can see this by looking at the LCB code or, simpler, by changing the angle from the property inspector in pointer mode.
But if you have the boundingBox of the SVG path you can compute the widget size needed for a certain rotation of the path.
shiftLock happens
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Rotating Widgets Resizing
Indeed: some spotty little 9 year old suggested that yesterdayBut if you have the boundingBox of the SVG path you can compute the widget size needed for a certain rotation of the path.
when he was meant to be concentrating on a grammar test!
I cancelled the test (to everyone's relief), handed out some sweeties, and set them working on
it.
