ajstarks/giocanvas

Failing to compile with latest gioui version - nov 25

Closed this issue · 10 comments

hlima commented
Failing to compile with latest gioui version - nov 25

yes, I plan to work on that soon.

Progress: now builds with the latest gioui, but images are broken.

Images fixed.

hlima commented

working great again.
Thanks

hlima commented

unfortunately image is not behaving properly ... The positioning does not seem to be correct nor the size..

@hlima can you show the code that is not working?

(see

canvas.Image("earth.jpg", colx, 15, 1000, 1000, 15)

for example use

hlima commented

canvas.CenterImage("earth.jpg", 50, 50, int(canvas.Width*0.06), int(canvas.Height*0.09), 100)
The code I am using is similar to the above. This should draw the image in the canvas center and have it proportionally resized. It is slightly off center and the resize does not seem to work.

I see, suggestion: use the natural width, and height, and resize via the scale.

hlima commented

using scale seems to solve the resizing. thanks.
Position is still not working. seems to be better when the canvas size is increased. may be it is a rounding error?