SRL Archive - Other Scripts

SCAR Paint!


mastaraymond

2007-07-25 18:10:23

Hello,

This is my first form script, its a 'paint' form. You can draw things on it, hehe ^^. Just try and leave a comment:).

Next version will have (I hope):
Load & Save functions! - Done!
More than 1 undo save! - Done!
A color picker! - Done!
Text functions!
Selection!

Update: Uploaded v0.2, added some functions: Ability to make a square only, resizing (Not working right, error at close), Save \ Load bitmaps, 2 colors instead of 1.
Update: Uploaded v0.3, added loads of functions:
Project loading \ Project Saving, Action list outprint, Undo, Redo, Fixed the close error, Loads faster color replacing (Thnx bullzeye for help), popup if your closing the script but not saved, something that remembers your directory even after scar restart and a color picker!
The new thing is a action list, everytime you do something it is added to the list. When you save this 'list', you can save a 'homedraw' bitmap into a txt file or something. Notice this won't work if you loaded a bitmap, you have to resave it as a bitmap! Also, the print out function, prints your actions which means you can place them into your own canvas script! And a thanks to nielsie for answering my questions!

~Raymond

REMOVE
OurForm.Constraints.minHeight := 350;
OurForm.Constraints.MinWidth := 507;

At line 741 & 742.. If it gives compiling errors


Post suggestions please ;).

Freddy1990

2007-07-25 18:18:20

This is very nice man, another job well done :)
However, I have a few suggestions…
To change the color have the user click the colorbox instead of the change button, also try to add when pressing shift for example always a square instead of a rectangle, you knoiw, like paint :)

mastaraymond

2007-07-25 18:23:10

From: Freddy1990
This is very nice man, another job well done :)
However, I have a few suggestions…
To change the color have the user click the colorbox instead of the change button, also try to add when pressing shift for example always a square instead of a rectangle, you knoiw, like paint :)

Cool suggestions, didn't knew that about mspaint ;). I made a button because some people might be stupid enough to now know how to change the color ;).

Going to sleep now, bye!

Lalaji

2007-07-25 18:30:16

omg..This is like immpossible to do…

HOW did you do it?

Jason2gs

2007-07-25 19:04:17

Sweet (h)

I remember thinking about making one of these before. Never got around do it :p

bullzeye95

2007-07-25 19:13:45

Nice! I have a suggestion though. I don't know how hard it would be, but you think you could to selections? And also, instead of right clicking doing undo, maybe you could set a color to right click, like MS Paint? And have undo as ctrl + z, in the *edit menu*?

Janilabo

2007-07-25 19:18:44

From: lalaji
omg..This is like immpossible to do…

HOW did you do it?
Because mastaraymond = leet. :D

Nice job Raymond, I like it! :spot:

GoF

2007-07-26 05:15:01

Weow, this is really nice!

Pentti

2007-07-26 05:29:20

Hehe, cool! Paint in SCAR! :D
Nice idea!

mastaraymond

2007-07-27 06:29:59

Thnx for posts guys! Next version will have a REALLY cool function : A output, this will writeln all the actions you have done, which means, you can draw them again on DebugWindow and stuff! /Me is going to work on it :). I still need help on the resize thingy, anyone? ^^

~Raymond

EDIT : Nice! I have a suggestion though. I don't know how hard it would be, but you think you could to selections? And also, instead of right clicking doing undo, maybe you could set a color to right click, like MS Paint? And have undo as ctrl + z, in the *edit menu*?

Ill add those! The undo thingy, is a bit complicated, but its on the list ;). Oh, ill try to add text!

EDIT: Uploaded v0.2, added some functions: Ability to make a square only, resizing (Not working right, error at close), Save \ Load bitmaps, 2 colors instead of 1.

bullzeye95

2007-07-27 22:58:51

I was looking around for a way to make it actually resize the image when you resize the form (that is, if you didn't find a way yet. I forgot). I found FastDrawSizeTransparent. It will resize the bitmap you give it according to the dimensions you want.

Smartzkid

2007-07-28 00:23:50

Very nice!

PS: 'Multi-Line' is, more accurately, called a polyline

mastaraymond

2007-07-28 19:08:15

Uploaded v0.3, added loads of functions:
Project loading \ Project Saving, Action list outprint, Undo, Redo, Fixed the close error, Loads faster color replacing (Thnx bullzeye for help), popup if your closing the script but not saved, something that remembers your directory even after scar restart and a color picker!
The new thing is a action list, everytime you do something it is added to the list. When you save this 'list', you can save a 'homedraw' bitmap into a txt file or something. Notice this won't work if you loaded a bitmap, you have to resave it as a bitmap! Also, the print out function, prints your actions which means you can place them into your own canvas script! And a thanks to nielsie for answering my questions!

Check first post! Its almost a image editor!

~Raymond

BobboHobbo

2007-07-28 23:19:31

Hahah awesome. You made it good, but the bad thing is i cant draw in paint/SCAR Paint for crap :(

Santa_Clause

2007-07-28 23:34:49

Nice Ray. I see you're having fun with forms now :p

mastaraymond

2007-07-29 07:55:47

From: SantaClause
Nice Ray. I see you're having fun with forms now :p
Lol :spot:. Yea Im having fun with them, but at the same time i really hate them. Stupid errors those forms ginve, bah:redface:.

~Raymond - Any one knows why OnKeyDown isn't working?

bullzeye95

2007-07-31 17:35:21

Do NOT hold ctrl when free drawing :p

CheetahNub

2007-08-12 11:39:10

lol I didn't know you could do thing like this with SCAR. :)

Nice work

R0b0t1

2007-08-13 18:02:29

Can you say:


K3w1 b1tch?

You deserve a cookie….

mastaraymond

2007-08-14 16:10:10

From: r0b0t1
Can you say:


K3w1 b1tch?

You deserve a cookie….

Hehe, thanks!

503075000868

2007-08-15 12:12:06

I get an error? Line 741: [Error] (741:9): Unknown identifier 'CONSTRAINTS' in scrip

kaustav_002

2007-08-15 13:43:40


Negaal

2007-08-26 14:37:04

not so adavanced like paint but still very cool and nice