Hi
Description
AGK vector drawings is an application/software for PC and android, to create vector drawings with AppGameKit, and export them as text files or images (with transparency).
I try to create a little application to create vector drawings/graphics with AppGameKit (bezier, ellipse), with color and stroke.
It's not easy, because agk don't have any command for vector drawing, and do the rendering with drawellipse(), drawline() drawbox() or sprite isn't very good.
So, I have made this little app to create drawings, with a kind of "simili" vector.
Help : BaxSlash (bezier curve), Swissolo (fill a polygon !), Hubert Baire (drawellipse modified) and other codes but I can't remember who (point(), rgbtohsl/hsltorgb)
Start of the project :
Last version
Version 0.52.08 (13 november 2023)
Download last version from github :
https://github.com/blendman/agkvectordrawing/blob/main/release/
Github repository :
https://github.com/blendman/agkvectordrawing
Other download (not the last version):
https://blendman.ldvmultimedia.com/opensource/agkvectordrawing.zip
The current shapes :
- shape with Bezier curves (thanks to Baxslash) or "polygon"
- Ellipse (help Hubert Baire)
- Box
- image
- text
The features :
See infos.agc for the releaselog and more informations
Main features :
- create shapes, set colors and opacity, add "fx" to shapes
- shapes transformations/editions : copy, paste, move, rotate, scale, flip h/V...
- save, load documents
- export : image (png), SVG, in agk code (little game code exemple)
The screens :
- screen start : to open, copy, delete, rename ... our project. We have our projects, exemples, and autosave file (we can select severals files, export them, delete them, we can create a .zip with all our files (save on the internal disk on android or PC).
- Screen option to change the options
- screen myimages : to add, save, rename, delete or select our images (for shape image), or use external images (works on pc and android)
- screen drawing : to create and draw our shapes (Stroke, color, and FX), export as image (png) or SVG. save document, export selected shapes as image or file, export layers as image (option : crop)....
In screendrawing :
Shapes :
- create a shape (bezier curve (open/closed), ellipse, box, images, text)
- delete a shape
- add FX to a shape
- select and deselect, multi-selection
- move or scale the selected shapes
- add points / delete points (only for bezier curves), move points, select points (and change its type (free, hard, mirored) or visibility (drawn if visible)
- points can be "hard" (like basic polygon), mirored or "free"
- set shape parameters : name, color, alpha, depth, scale, position, open/closed, hide, lock.
- set stroke parameters : color, alpha, type of stroke (ellipse (typ=0), box (typ = 1), sprite (typ>=2)), antialiased with some sprite typ, scatter, and other "brush" parameters (only with sprite (typ>=2) : random rotation, user rotation, use angle of direction, space between dots.
- shape, stroke and fx : color selector and pick buton (to get color from another shape)
- shape box : color flat or gradient
Tools :
- flip Horizontal and vertical : flip the points for beziers curve
- widgets : scale the shape (scale the points), rotate (the points), resize in w /h (shape for the moment)
- copy parameters (color for the moment), copy selected shapes, paste shapes,,duplicate selected shapes (copy/paste)
Layers :
- layers : we can add, move up/down, delete a layer, hide or lock it. On a layer we can create shapes.
Files :
- save/load doc, import/export in clipboard, export in Zip all files, save on internal disk (pc, android)
- export as image (with background transparent, color, or gradient background), export layers as image, export in SVG, PNG
- draw shape with color or not, with stroke or not. Draw the stroke we want (hide point to not drawn the selected stroke (with selected point)
GUI :
- camera x, y, width, height (for the export size) and scale.
- move (pan) and zoom the canvas, PinchZoom on android (thanks to baxslash)
- boundingbox change its size if we move points.
- option : set the number of segment for the curves, set the size of the image for polygon filled (for optimisation), setimagemag/minfilter (for color and stroke), camera parameters (width, height).
So here the current GUI (freely inspired by vector_motion):
Version 0.47 :
Stroke "fade size":
Version 0.3x to 0.43 :
Shape and Stroke "style" (1: with no stroke, 2 : with a brush (sprite with a brush image)) :
SHape FX :
Version 0.28
Version 0.20 :
version 0.11 :
A video to show the current state of the app (version 0.11) :
And Some images created with this software/application (rendertoimage) :
Version 0.3x to 0.42 :
version 0.2x :
version 0.11 :
What I hope to add : (todolist)
- flipH/v on the points not on the sprite.
- Scale the points, not the sprite
- multi selection (move, copy/paste, scale)
- shape images
- bank of shapes
- widgets (to change scale, width/height, rotation).
- add layer (+layer properties)
- basic parenting (move the parents shapes)
Rendering :
I try to use some shader to render the shape (preview in the app and final rendering). I ahve tryed to convert a bezier shader from shadertoy and it works, but I have to find how to use that for rendering.
My test (transparent background when saveimage):
License
Open source GPL
What is the interest ?
- create drawings with almost unlimited size (in fact limited by the virtual resolution) and kind of "vector" system
- drawings can be anti aliased, if you use stroke Type = 2 (or the number of the brush image (in images folder) +2)
- we can create application without any graphics, but with text files, and render the graphics at start of the game
.
- show what AppGameKit can do
Bugs known or limitations :
- change scale of a shapebox may cause unwanted result
- shapes bigger than the virtualscreen are cropped
Download link (with sources) :
(I will add this on my github profil)
https://blendman.ldvmultimedia.com/opensource/agkvectordrawing.zip
Old versions :
https://github.com/blendman/agkvectordrawing/tree/main/release
0.11
https://blendman.ldvmultimedia.com/opensource/agkvectordrawingv0.11.zip
Bank of shapes :
I will post later some simple shapes I have created
(heath, leaf, eye...)
And what about animation ?
- for the moment, it's not what I will add, but hey ! this tool is open source, you can change it and add animation features if you want
I hope you like it and it will be usefull.
Yes, AppGameKit is very powerfull
Cheers !
AGK2 tier1 - http://www.dracaena-studio.com