How to offset placement of referenced images?
brahma at hindu.org
Fri Sep 22 15:25:28 EDT 2017
We need to occasionally Offset referenced images in their frame.
place a large image into a small rect; move that image internally so that a given area of the composition is focused/centered in the image area.
I thought I knew how to do that, but today the method escapes me. Is it possible? basically you would set the top left or top of the image data to some offset relative to the rect of the image object that contains it.
Perhaps my head is munging Livecode with the power of CSS to use offsets like this to leverage single images "sprites" that contain multiple icons which are simply shown by changing offsets of the background of a div
We could dynamically import these, and use crop, but we don't want to do that because it bloats the stack in RAM
Hoping not to have to resort to masks and such. Is offsetting the imagedata in a referenced image even doable? use the Cmd key plus dragging handles does not work on referenced images. Looks like it implements crop internally which can only operate on imported imageData. Strange effects on screen…
More information about the Use-livecode