User Module: Application: Shape designer.

Share your advanced PureBasic knowledge/code with the community.
collectordave
Addict
Addict
Posts: 1310
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

User Module: Application: Shape designer.

Post by collectordave »

I am attempting to put together a Print and Preview module published elsewhere on the forum. This allows me to print what I want where I want and eventually on any sized piece of paper in portrait or landscape. Having some success.

I had the need to print a pentagon the other day and needed it to be at various sizes on the paper and preview but found it a pain. looked at MS Word where they have a library of shapes you can insert in a document and thought will I have to put in loads of feature requests? Can I do all this myself?

Looked at using images but a little worried about scaling and did not want to lose the quality of the vector graphics functions

The idea is you can have a library of shapes which are really a collection of path commands to create a shape which can then be displayed and printed at will in much the same way as AddPathBox. These shapes can be any collection of path commands which are defined in a 100X100 box and then saved to a database with a shape name and group. Of course when defined a programme can include all the shapes and could even allow the programme users to add customised shapes.

To get started on this I have created a shape designer program. This allows you to create new shapes, load and edit existing shapes etc. I have only implemented Line and Arc commands as yet and I am looking to add Circle and curve.

This is very much Version 1.0.0 for testing. I am releasing it now to get reactions\help from the forum. Is it a good idea? Can anyone use it to design shapes for inclusion? Can anyone suggest improvements to the programme.

Here is the dropbox link to download. as usual no exe file just the .PB files and database. Included is a backup database of shapes as I have been doodling while testing select Regular Polygons and triangle then click load and you will see what I mean.

https://www.dropbox.com/s/oj5ti4zckcw6b ... r.zip?dl=0
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: User Module: Application: Shape designer.

Post by davido »

@collectordave,
A really nice idea. :D
I do hope you will be able to extend it by-and-by.

Could you, perhaps add undo as I am very good at making mistakes! :)
DE AA EB
collectordave
Addict
Addict
Posts: 1310
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: User Module: Application: Shape designer.

Post by collectordave »

Hi Davido

I will be extending this with the addition of circle and curve commands. The main idea is to integrate this into the CDPrint includefile to allow shapes to be displayed and printed.

Working on adding a viewer to allow users to see all defined shapes and a test portion to test any shape added to the library by inserting it onto a canvas and allowing resize with mouse etc.

This may take me a little time but keep watching and it will be there.

Regards

CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
Post Reply