For an experiment I tried this script where I create a stipple to create a
10x10 grid on the canvas. And then I draw a rectangle from 10,10 to
200,200. If I use InvertYAxis transformation function my y1 and y2
transform to 387 and 197 (Why does it transform to this? I thought it would
be height-y-1?) and I get the following:

[image: image.png]
If I use the transformation: height - y -2 then the rectangle aligns
perfectly as shown below:
[image: image.png]
But I don't understand why doesn't height-y-1 align with it.It seems the
stipple starts 1 pixel higher??

Milind


On Tue, Dec 17, 2019 at 2:07 PM Milind Gupta <milind.gu...@gmail.com> wrote:

> Hi,
>          I want to create a stipple for a fill on the entire canvas in a
> way so that I see a grid on the canvas. I want this stipple to be placed on
> the canvas in a particular alignment so that the grid points match certain
> coordinates. So is there a way to figure out how the stipple is placed on
> the canvas so that we know at what coordinate (and its multiples) a 1 on
> the stipple ends up on?
>
> Thanks,
> Milind
>

Attachment: stipple.lua
Description: Binary data

_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to