Vector Curve Designer (RAD Tool)

Share your advanced PureBasic knowledge/code with the community.
Little John
Addict
Addict
Posts: 4519
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Vector Curve Designer (RAD Tool)

Post by Little John »

The new version is cool, thank you!
Little John
Addict
Addict
Posts: 4519
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Vector Curve Designer (RAD Tool)

Post by Little John »

RASHAD wrote:- Will you add the next 2 lines to your code to solve PB 5.72 problem with the default font
I can't see any problem here with netmaestro's code and the default font, using PB 5.72 on Windows 10 (regardless whether the DPI aware compiler option is switched on or off).

Adaption can be necessary for properly running old codes with PB 5.72+ on Windows.
But if you create a new program for PB 5.72, like netmaestro did, there is no need to add such lines.
See viewtopic.php?f=37&t=75048
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Vector Curve Designer (RAD Tool)

Post by IdeasVacuum »

Superb Netmaestro

Hollywood voice-over on your video too 8)
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
blueb
Addict
Addict
Posts: 1037
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Re: Vector Curve Designer (RAD Tool)

Post by blueb »

Nice work, as usual Mr. Net.

I have an issue...

- Imported a simple hexagon image ( a traffic Stop sign)
- Clicked on "Independent curve" option
- drew the bottom horizontal line
- pressed the Commit this curve button
- went to the top left of the image to draw the top horizontal line

Boom :mrgreen:

Even though I had chosen indepedent curve, the Curve Type changed to "Continuation of last curve" and placed a dotted line from the bottom right to the top left of the image.

Spent some time looking for an "undo" method to no avail. In fact I had no other option but to press the commit button.

Is it me?
- It was too lonely at the top.

System : PB 6.10 Beta 7 (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8422
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Vector Curve Designer (RAD Tool)

Post by netmaestro »

Ah. Some failure to communicate there. The "independent curve" option is good for the next curve only and if you want all independent curves you have to click it each time. I should probably change that. Undo is coming today as soon as I get resizing done.
BERESHEIT
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Vector Curve Designer (RAD Tool)

Post by IdeasVacuum »

Enhancement Request - Save Image

Edit: .... and zoom loaded image?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Vector Curve Designer (RAD Tool)

Post by IdeasVacuum »

Ah - I just messed-up a drawing. In "continuation" mode, I stupidly clicked on the end point of the previous curve - result is that Curve Designer locks-up.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8422
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Vector Curve Designer (RAD Tool)

Post by netmaestro »

Ah - I just messed-up a drawing. In "continuation" mode, I stupidly clicked on the end point of the previous curve - result is that Curve Designer locks-up.
It doesn't lock up. It's just that all the control points are on top of each other. You can drag them apart and move your endpoint where you want it and just continue.
BERESHEIT
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8422
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Vector Curve Designer (RAD Tool)

Post by netmaestro »

At the cost of some clumps of my hair, resizing is complete. You can now size the window up and down and keep working with the image. As a bonus you can even be in the middle of working with a new curve, change the size and keep working with it. Code updated in first post.

Also with this update you can now draw curves without a reference image.
BERESHEIT
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4622
Joined: Sun Apr 12, 2009 6:27 am

Re: Vector Curve Designer (RAD Tool)

Post by RASHAD »

@Little John
What if a guy like me changed windows system font and its size using a tool like Winaero Tweaker or Asian version of windows
It is better to depend on Windows font mapper

@NM
Looks good as always
If at any time you need your version 1,2 or 3 just ask :)
Egypt my love
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8422
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Vector Curve Designer (RAD Tool)

Post by netmaestro »

RAHSAD wrote:What if a guy like me changed windows system font
There are no guys like you :mrgreen:
BERESHEIT
User avatar
Olliv
Enthusiast
Enthusiast
Posts: 542
Joined: Tue Sep 22, 2009 10:41 pm

Re: Vector Curve Designer (RAD Tool)

Post by Olliv »

It is ever a pleasure to read such a code. Thank you !
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8422
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Vector Curve Designer (RAD Tool)

Post by netmaestro »

I have implemented Undo/Redo, code is updated in the first post. It is very early in the process so do try and see if it will do something unexpected. I've been playing with it and it seems ok but that's one person only and not a lot of tries. One thing though, if you undo a curve that's not committed yet you can't have it back with redo. Everything else can be removed with undo and added back with redo.
BERESHEIT
Little John
Addict
Addict
Posts: 4519
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Vector Curve Designer (RAD Tool)

Post by Little John »

RASHAD wrote:@Little John
What if a guy like me changed windows system font and its size using a tool like Winaero Tweaker or Asian version of windows
It is better to depend on Windows font mapper
I don't know. Please tell me what the effect is. Are you saying that PureBasic 5.72 has a problem with Asian version of windows?
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4622
Joined: Sun Apr 12, 2009 6:27 am

Re: Vector Curve Designer (RAD Tool)

Post by RASHAD »

I don't know. Please tell me what the effect is. Are you saying that PureBasic 5.72 has a problem with Asian version of windows?
What are you trying to say
It had been discussed before

https://www.purebasic.fr/english/viewt ... 3&t=75036

End of discussion
Egypt my love
Post Reply