Hello Erel,
After drawing a flipped bitmap, I fail to make further drawings on the same view.
In the source code,
Canvas1.DrawCircle(xj, yj, 3dip, Colors.Black, True, 1)
does not draw, unless I do not flip the image.
Perhaps, a Label to flip and draw on is no good choice, but it should not make any difference whether using a Label or an ImageView.
Anyway, can you please check the DrawBitmapFlipped function?
Thanks
Robert
After drawing a flipped bitmap, I fail to make further drawings on the same view.
In the source code,
Canvas1.DrawCircle(xj, yj, 3dip, Colors.Black, True, 1)
does not draw, unless I do not flip the image.
Perhaps, a Label to flip and draw on is no good choice, but it should not make any difference whether using a Label or an ImageView.
Anyway, can you please check the DrawBitmapFlipped function?
Thanks
Robert
B4X:
Sub DrawPositions
Canvas1.Initialize(labJupiter)
Canvas1.DrawBitmapRotated(bmpJup,Null,DRect, -tilt * rad)
bmpJupRot.Initialize3(Canvas1.Bitmap) 'copy tilted image for Flipping
For i = 1 To 4
x = jx(i) * sc
y = jy(i) * sc
RotatePoint(x, 0, y, 0, 0, tilt)
Canvas1.Initialize(labJupiter)
Select Case optics
Case 1
x = x0 + xg
y = y0 - yg
xj = x0j + xg * 2
yj = y0j - yg * 2
'Canvas1.DrawBitmapFlipped(bmpJupRot,Null,DRect,False,False)
labNS.Text = "N"
Case 2
x = x0 - xg
y = y0 + yg
xj = x0j - xg * 2
yj = y0j + yg * 2
Canvas1.DrawBitmapFlipped(bmpJupRot,Null,DRect,True,True)
labNS.Text = "S"
Case 3
x = x0 + xg
y = y0 + yg
xj = x0j + xg * 2
yj = y0j + yg * 2
Canvas1.DrawBitmapFlipped(bmpJupRot,Null,DRect,True,False)
labNS.Text = "S"
Case 4
x = x0 - xg
y = y0 - yg
xj = x0j - xg * 2
yj = y0j - yg * 2
Canvas1.DrawBitmapFlipped(bmpJupRot,Null,DRect,False,True)
labNS.Text = "N"
End Select
Canvas1.DrawCircle(xj, yj, 3dip, Colors.Black, True, 1)[COLOR="Red"] 'THIS FAILS AFTER FLIP BUT DRAWS CORRECTLY WITHOUT PRIOR FLIPPING[/COLOR]
labJupiter.Invalidate
Next
End Sub