D dannyjon Member Licensed User Longtime User May 24, 2021 #1 How can I plot a mark over a touchimageview which also moves when the view is dragged. Is there a way to consume to drop co-ordinates after drag?
How can I plot a mark over a touchimageview which also moves when the view is dragged. Is there a way to consume to drop co-ordinates after drag?
agraham Expert Licensed User Longtime User May 25, 2021 #2 I don't know about TouchImageView as I use my ScaleImageView which is Android only but is meant for this sort of application. It can natively draw a circle at a point of an image that moves with the image and can scale with the image if needed. It also gives you an OnDraw event so that you can draw anything you want on the image. ScaleImageView - Pan and zoom large images | B4X Programming Forum Upvote 0
I don't know about TouchImageView as I use my ScaleImageView which is Android only but is meant for this sort of application. It can natively draw a circle at a point of an image that moves with the image and can scale with the image if needed. It also gives you an OnDraw event so that you can draw anything you want on the image. ScaleImageView - Pan and zoom large images | B4X Programming Forum
D dannyjon Member Licensed User Longtime User May 25, 2021 #3 agraham said: I don't know about TouchImageView as I use my ScaleImageView which is Android only but is meant for this sort of application. It can natively draw a circle at a point of an image that moves with the image and can scale with the image if needed. It also gives you an OnDraw event so that you can draw anything you want on the image. ScaleImageView - Pan and zoom large images | B4X Programming Forum Click to expand... Thank you. I shall explore this further. Upvote 0
agraham said: I don't know about TouchImageView as I use my ScaleImageView which is Android only but is meant for this sort of application. It can natively draw a circle at a point of an image that moves with the image and can scale with the image if needed. It also gives you an OnDraw event so that you can draw anything you want on the image. ScaleImageView - Pan and zoom large images | B4X Programming Forum Click to expand... Thank you. I shall explore this further.
D dannyjon Member Licensed User Longtime User May 25, 2021 #4 I have a question about this library: How can I stop the circle being added in the centre of the image on startup? Can not see where this is added. Is there an option to remove a circle drawn or should the canvas be initialized again? Last edited: May 25, 2021 Upvote 0
I have a question about this library: How can I stop the circle being added in the centre of the image on startup? Can not see where this is added. Is there an option to remove a circle drawn or should the canvas be initialized again?
agraham Expert Licensed User Longtime User May 25, 2021 #5 dannyjon said: I have a question about this library Click to expand... Which library? If you mean ScaleImageView the circle and text are drawn in the Viewer.ScaleImageView1_OnDraw event. Read all the comments in the XML and all should be clear. Upvote 0
dannyjon said: I have a question about this library Click to expand... Which library? If you mean ScaleImageView the circle and text are drawn in the Viewer.ScaleImageView1_OnDraw event. Read all the comments in the XML and all should be clear.
D dannyjon Member Licensed User Longtime User May 26, 2021 #6 agraham said: Which library? If you mean ScaleImageView the circle and text are drawn in the Viewer.ScaleImageView1_OnDraw event. Read all the comments in the XML and all should be clear. Click to expand... Yes I have read the XML and understand how the Viewer.ScaleImageView1_OnDraw event works but there is no code in the example that shows how the circle in the image below is created unless it is in another method but I have checked and don't see where it could be coming from. I have returned out of the ...OnDraw but still this circle appears on the first run. Sorry for my confusion! Upvote 0
agraham said: Which library? If you mean ScaleImageView the circle and text are drawn in the Viewer.ScaleImageView1_OnDraw event. Read all the comments in the XML and all should be clear. Click to expand... Yes I have read the XML and understand how the Viewer.ScaleImageView1_OnDraw event works but there is no code in the example that shows how the circle in the image below is created unless it is in another method but I have checked and don't see where it could be coming from. I have returned out of the ...OnDraw but still this circle appears on the first run. Sorry for my confusion!
agraham Expert Licensed User Longtime User May 26, 2021 #7 From the XML and shown as Intellisense in the IDE EnableCircle Property Readable As Boolean Writeable As Boolean Gets or sets whether a circle will be drawn at the image coordinates specified by CircleX and CircleY. The default is False. Click to expand... This is also a Designer property "Enable Circle". In the Viewer layout it is set True. Upvote 0
From the XML and shown as Intellisense in the IDE EnableCircle Property Readable As Boolean Writeable As Boolean Gets or sets whether a circle will be drawn at the image coordinates specified by CircleX and CircleY. The default is False. Click to expand... This is also a Designer property "Enable Circle". In the Viewer layout it is set True.
D dannyjon Member Licensed User Longtime User May 27, 2021 #8 agraham said: From the XML and shown as Intellisense in the IDE This is also a Designer property "Enable Circle". In the Viewer layout it is set True. Click to expand... I set the property to False in the designer and when clicking the siv there are no circles. Setting True/False in code also produces the same result so either you have to have the centre circle with circles appearing on touch or no circles at all. Solution was to set circleX,CircleY = -10 and then the only circles that appear are when the SIV is touched. Last edited: May 27, 2021 Upvote 0
agraham said: From the XML and shown as Intellisense in the IDE This is also a Designer property "Enable Circle". In the Viewer layout it is set True. Click to expand... I set the property to False in the designer and when clicking the siv there are no circles. Setting True/False in code also produces the same result so either you have to have the centre circle with circles appearing on touch or no circles at all. Solution was to set circleX,CircleY = -10 and then the only circles that appear are when the SIV is touched.
agraham Expert Licensed User Longtime User May 27, 2021 #9 dannyjon said: so either you have to have the centre circle with circles appearing on touch or no circles at all. Click to expand... No you don't. Examine the OnDraw event code. The clicked circle presently uses the radius of the intrinsic circle, if the intrinsic circle is not drawn the radius is zero so the clicked circle won't be drawn. Set the radius separately. You can draw whatever shapes and text you want wherever you want in the OnDraw event. There are no limitations. Upvote 0
dannyjon said: so either you have to have the centre circle with circles appearing on touch or no circles at all. Click to expand... No you don't. Examine the OnDraw event code. The clicked circle presently uses the radius of the intrinsic circle, if the intrinsic circle is not drawn the radius is zero so the clicked circle won't be drawn. Set the radius separately. You can draw whatever shapes and text you want wherever you want in the OnDraw event. There are no limitations.