Hello,
using canvas picture to display graphic objects (SkyMap) .
all the code is called from the canvas openEvent
'Initialize the Canvas with default settings
#If TargetWin32
me.EraseBackground = False
me.DoubleBuffer = True
me.Transparent = true
app.UseGDIPlus = True
#Elseif TargetMacOS
me.DoubleBuffer=False
me.EraseBackground=True
#ElseIf TargetLinux
me.DoubleBuffer=False
me.EraseBackground=True
#EndIf
If PictureHeight = 0 then
Call RunOnce
end If
TAHaz.visible=false
Call Init
Call DrawSky // display the SkyMap in the canvas.
////////////////////////////////////////////////////
MouseMove (x,y)
mX = X
mY = Y
If chkCurseur.Value = true Then
'search the closest star to the cursor pointer
Call HighLightStarFromCoord(g,mX,mY) return the starname inside the ring (pointer)
end if
The method HightLightFromCoordinates(g,mX,mY) is called from MouseMove event because cursor coordinates “mX” and “mY” are requested.
Then HightLightFromCoordinates(g,mX,mY) return the graphic “name of the star” pointed on canvas.
unfortunately nothing happened
adding me.invalidate to HightLightFromCoordinates(g,mX,mY) the pointer appear and show the exact starname but the background (skyMap) disappears, canvass become transparent (white).
That’s roughly my problem.