Page 1 of 1

Painting canvas

Posted: Wed Nov 12, 2014 9:59 am
by billv
A basic Drawing Grid/Painting Canvas/value creator
16 Colours.(Use properties in "Color map" selector to quickly change default colors.)
Save into 16 slots.(expandable ..use properties in the "Array Amount" selector if needed)

I mention the term "Value creator", cause it seems like it may be very useful for
drawing game levels.

Version 4
Drawing Grid_v0.4.fsm
(258.62 KiB) Downloaded 1316 times

Re: Painting canvas

Posted: Wed Nov 12, 2014 10:59 am
by Nubeat7
cool, it time for some pixel art ;)

maybe the color table i did a while ago could be interesting for this..
viewtopic.php?f=3&t=1839&start=40

Re: Painting canvas

Posted: Wed Nov 12, 2014 12:05 pm
by billv
Exactly mate...thats what I did next...pur a, r, g, v control
+ reset on each color. but ran into some trouble with
colors not updating right...so I turned to your color map
for ideas .
But thing is ive got other versions progressing, where ive
started with a simple point class. Fun way to learn class
and id like to add ability to draw shapes maybe.
.One of my main goals at the end of this detour is
trying to build cellular automation in FS, like
Conway's Game of Life.
So im gonna backpeddle for a while with this class attempt.
I can upload the other version with the extra argb mods
.I also was thinking to put 16 color on multiplex
on all 16 colors...so after you draw you can change
and compare your design with different colors...
Also have to go back and get right mouse drag deletion
happening ...or go with another idea to detete or rub out
in bulk.
Some info on Game of Life and cellular automation
http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
http://rosettacode.org/wiki/Conway%27s_Game_of_Life
http://jonathan-jackson.net/life-in-a-shade-of-ruby
http://www.sitepoint.com/opal-ruby-browser-game-life/

.

Re: Painting canvas

Posted: Fri Nov 14, 2014 12:25 pm
by billv
Nubeat7 wrote:maybe the color table i did a while ago could be interesting for this.

i put 16 of them in on a tab...is great result for user, heaps of flexibilty with each color.
But a bit too heavy to drag in and out of toolbox....
Also sorting through some 'first color' on load issues....
Also some red candy issues after dup...that disappear if you go a few levels down...
Looking at other ways....maybe just 4 draw waves to push all a,r,g,b values...
Ideally rebuild color table inside 1 ruby prim...
But keep getting distracted with more detours...
:o :o :o
i just realized this drawing grid is a "piano Roll". :D :D :lol:

Re: Painting canvas

Posted: Mon Nov 17, 2014 5:22 am
by billv
Has been Updated to Version 2...download at first post...
In this version...
* You can now erase with right click DRAG..
* External colors are gone. Instead there's array's of 16 internal colors/brushes.
* Randomize all colors button
* Set individual r,g,b for all colors via 3 knobs.
* R,g,b values are saved as well for all arrays.
* instead of 16, the selector is set to 32 slots for saving.

Re: Painting canvas

Posted: Thu Nov 20, 2014 10:11 am
by Perfect Human Interface
Haven't tried this out yet, but I've been thinking in the past how a module like this could be useful for quickly making backgrounds or other graphic elements during prototyping.

Re: Painting canvas

Posted: Sat Nov 22, 2014 6:27 am
by billv
Perfect Human Interface wrote:quickly making backgrounds or other graphic elements during prototyping.

Yes...that was the general idea.
But ATM is only usefull for for small gui windows...if you stretch the grid out the
mouse capture is real bad.
Got around this issue now...working on next update....
in the next update..
Accurate mouse capture..
hatchbrush/Gradient/ brushes ...
You can change the hatchbrush style in every brush...(some real interesting results here )
i had texture brush as well but it was very slow(even using tiny files) so i ditched
it(will try again with the new mousecapture code)
Some random auto-fill options..

Re: Painting canvas

Posted: Tue Nov 25, 2014 2:44 am
by billv
Has been Updated to Version 3...download at first post...
In this Update....
New Stuff...
* Accurate mouse catpure
* For each color slot, you can choose Brush/Hatchbrush or Gradient
* Hatchbrush or Gradient Arrays can be rotated/reversed/randomized/shuffled or
controlled by master knob
* All this stuff is saved via Preset manager(bv)
* Randomize positions Button..(autofill) with knobs for Quantity and Amount of colours
* Right mouse Drag deletion option..Either deletes all or just the currently selected color
* You can now set a B/G color...or
* using the "Use color 16" switch, loses you a drawing color, but allows use of the r,b,g knobs
* right mouse double click to clear screen has been removed to avoid data loss via
accidental double click... Clear Screen is now a button....(takes some getting used to..)

TIPS/NOTES...
Note that the colors are drawn in "layers". So you can draw over and under stuff,
depending where your color is on the selector.
Hatch and gradient arrays are mapped using the first color as the base...

Bugs..
Small bug in right drag delete....sometimes will delete a wrong pixel......

Re: Painting canvas

Posted: Wed Dec 03, 2014 11:20 am
by billv
Has been Updated to version 4..
In this version....

* R,g,b controls now update all the time
* hatchbrush choices are now displayed in selector
* There is now a default "white" color, underneath the grid and user b/g
* the Autofill was fixed and now behaves as it should...
* New Color Palettes for current color selection and for b/g color
* Can now save it as exe..or vst if needed...
* Copy and paste(save) to another index. (R,g,b and the main position/pixel array's only)

Thanks Chackl, KG and tulamide.

note:
on load...if you see any "red candy" in the FS display window ,
just click schematic b/g once .....don't know why the candy only appears in FS display.. :?

Re: Painting canvas

Posted: Thu Dec 04, 2014 10:34 am
by billv
Bug report:
Copy/paste dosn't work unless you save first.
So..
Step 1. Save it at Preset manager current index.
Step 2. Choose index to copy to using copy selector
Step 3. Hit Copy

Will write in a 'save' trigger before Copy button fires in next update and remove Step 1.