Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   Better DrawingPanel support? (https://forums.graalonline.com/forums/showthread.php?t=134256778)

DustyPorViva 11-02-2009 09:04 AM

Better DrawingPanel support?
 
Right now drawing panels are extremely limited in what you can achieve. You can basically only show an image and crop/stretch it. Not much you can do with that, honestly... at least if you're trying to do anything even remotely creative.

Suggestions:

1) ability to draw polygons.
2) ability to draw text.
3) ability to draw ganis.
4) clearimage(int x, int y, int width, int height)/clearpoly() - erases the shape of the image/polygon from the canvas. Would allow us to erase in the shape of circles, for example... or any shapes, really.
5) ability to manipulate the above and the existing methods much like we can any other image. Ability to change their colors/rotation and so on. How, since they're not images/objects? That's a good question... maybe store the last drawn image in an object? like MyDrawingPanel.panel.lastimage... Thus we would be able to do something like:
MyDrawingPanel.panel.lastimage.rotation = pi;
MyDrawingPanel.panel.lastimage.alpha = .5;

Or something. Now I realize that drawing panels work by strictly drawing to a canvas and leaving it as that, but maybe the last thing drawn could be preserved separately and only written on to the canvas when the next image is drawn to it?

Admins 11-02-2009 02:50 PM

In v6 and on server-side you can already draw text and curves, and you can apply a mask. Drawing showimg could be interesting too in the future.

fowlplay4 11-02-2009 04:05 PM

Don't forget setting of transparencies, and a replace color function.

DustyPorViva 11-02-2009 09:09 PM

And TDrawingPanel.panel.image? :D (allow us to use the panel as an image dynamically).

DustyPorViva 11-04-2009 11:25 PM

Hmm, apparently panels don't support alpha transparency? There is also no way to draw a cropped image AND resize it.

Also, I'm not very versed with serverside drawing panels, but I would love to be able to somehow pass the data of a clientside panel to a serverside one for image saving purposes. For example, say I wanted to create a painting program, and allow players to save the image to the server(think pictionary or something) for other players to view immediately after they're done. As far as I know, this isn't possible unless I save it clientside then upload the file then move the file and so on.

fowlplay4 11-05-2009 12:08 AM

Quote:

Originally Posted by DustyPorViva (Post 1536508)
Hmm, apparently panels don't support alpha transparency? There is also no way to draw a cropped image AND resize it.

Client-side doesn't, server-side works fine as far as transparencies are concerned.

Admins 11-05-2009 03:47 AM

What is the problem with saving and uploading the image?

DustyPorViva 11-05-2009 03:55 AM

Quote:

Originally Posted by Stefan (Post 1536561)
What is the problem with saving and uploading the image?

Well mostly that it doesn't need to be saved clientside. Like I said, if I made a pictionary script, the next step would be sharing it with other players/judges. So ideally it should be taken straight to the serverside and shared, rather than taking those many steps in-between.


All times are GMT +2. The time now is 05:41 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.