Page 7 of 7
Re: Vector Curve Designer (RAD Tool)
Posted: Sun Jan 29, 2023 10:34 pm
by Paul
IceSoft wrote: Sun Jan 29, 2023 7:48 pm
@Paul can you add this debug line before Select point (e.g.: line 1069) ?
Code: Select all
Debug "Point(" +Str(cursorx) + "," +Str(cursory)+ ")"
Select Point(cursorx, cursory)
Should be always >= 0
Hi IceSoft,
When the cursor is moved around in the drawing area (without any resizing of the form), if cursorx or cursory >699 then Point() fails
Re: Vector Curve Designer (RAD Tool)
Posted: Sun Jan 29, 2023 11:22 pm
by IceSoft
Paul wrote: Sun Jan 29, 2023 10:34 pm
Hi IceSoft,
When the cursor is moved around in the drawing area (without any resizing of the form), if cursorx or cursory >699 then Point() fails
@Paul
Can you add/replace (line 1067) this snippet plz and tell me what happens
Code: Select all
cursorx = GetGadgetAttribute(canvas, #PB_Canvas_MouseX)
cursory = GetGadgetAttribute(canvas, #PB_Canvas_MouseY)
If Not moveinprogress And cursorx < 699 And cursory < 699 ; < line 1067 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
If StartDrawing(ImageOutput(imgLayers(zoomlevel)))
Re: Vector Curve Designer (RAD Tool)
Posted: Mon Jan 30, 2023 12:11 am
by Paul
Hi IceSoft, actually I think it should be...
Code: Select all
If Not moveinprogress And cursorx<width_viewport And cursory<height_viewport
If I hardcode 700 (not 699) it only fixes the problem until a background image is loaded, then a new number is required which is generated in your InitializeCanvas() procedure.
I would also suggest changing line 126
to this so the icons are drawn the proper size for the higher DPI monitor with scaling.
The drawing canvas is not scaled properly either but I won't complain about that

Re: Vector Curve Designer (RAD Tool)
Posted: Mon Jan 30, 2023 9:59 am
by IceSoft
Paul wrote: Mon Jan 30, 2023 12:11 am
Code: Select all
If Not moveinprogress And cursorx<width_viewport And cursory<height_viewport
I would also suggest changing line 126
to this so the icons are drawn the proper size for the higher DPI monitor with scaling.
The drawing canvas is not scaled properly either but I won't complain about that
Good points.
@netmaestro can add this lines.
Re: Vector Curve Designer (RAD Tool)
Posted: Mon Jan 30, 2023 6:20 pm
by netmaestro
Recommended modifications re DPI Aware bug have been made and code in original post is updated. Version is now 1.1.01 thanks Paul.
Re: Vector Curve Designer (RAD Tool)
Posted: Tue Jan 31, 2023 8:51 am
by IceSoft
@netmaestro
Next feature wish:
The normal view is always "normal size" and the small view is more a lupe (which is always on => the lupe icon is no longer needed)
Re: Vector Curve Designer (RAD Tool)
Posted: Wed Jun 28, 2023 7:46 am
by IceSoft
I add a github repository for this nice tool:
https://github.com/aismann/PureBasic_examples
Add some new features too:
[FEATURES]
- Add a magnifier
- [Space] Enable/Disable the red 4 circles (for a better view)
- [RMB] Enable/Disable the red curve in the magnifier
- [RMB Dopple Click] same like 'Commit This Curve'
[Design]
- UI 'compacted'
Screenshot:
