stippled line variable point spacing from raster

 From:  bemfarmer
10809.27 
This link has some generic code for "transforming the coordinates from the specified coordinate system into pixel coordinates."
(2.1.2 Real-number Coordinate Systems)

https://math.hws.edu/graphicsbook/c2/s1.html#:~:text=In%20terms%20of%20coordinates%2C%20a,to%20right%2C%20starting%20with%20zero.

One step is to set up the various image rectangles. These are world, local, canvas, and primary.
MoI World coordinates come from MoI Local (cplane) coordinates using .evaluate. (See Michaels code.)

The primary image is the source PNG, TIF, JPEG, GIF, or BMP.
A primary image ( width, height ) ( 1920, 1080 ), has 1920 pixel columns, and 1080 pixel rows.
A test primary image will be ( 6, 5 ). (or maybe ( 12, 8 ).

The address for a pixel is ( rowNum, colNum )
the pixel columns and rows are zero indexed, with upper left corner ( 0, 0, 0 ).

The canvas image is similar to the primary image. (?) (Heightmap divides x by 2)
Reversing row number from bottom to top to top to bottom: ( oldrowNumber - numRows ) ?

- Brian

I am going to assume that a screen point that falls on a pixel boundary is in the pixel to the left, or above. (???)
Except uppermost edge and leftmost edge?

EDITED: 12 Aug 2022 by BEMFARMER