mattchewyJoin Date: 2008-02-19 Post Count: 7300 |
I'm talking to dev on the DP chat thing right now and he said an image API would be really good idea. He told me to post my ideas and the devs would looks at it. Here is what I put; please review/change/add anything you think it needs. Thanks!
Ok, I was thinking of an API where you could upload an image from the site and then be able to edit the image and use it in game! Here is some useful methods that could be in it:
crop(posX, posY, sizeX, sizeY) -- Basically selects area to crop, or resize(in a way), an image
resize(scaleX, scaleY) -- Resizes by scale, possible added as an extra form of crop function?
rotate(angle) -- Rotates by a certain angle
hue(r, g, b) -- Changes image hue
amend(image, offsetX, offsetY) -- Adds image on to another at the offset positions; amended image gets added on-top of the called image
addText(text, font, size, color) -- Adds text to image
addShape(enum shape) -- List of predefined shapes(Rectangle, sphere, triangle)
Code:
local image = Image.new(“http://www.roblox.com/asset/?id=808080”) -- Load image from file
image:crop(10, 10, 100, 100) -- Edits current image
local new_image = Image.new(image) -- Clones an image, instead of editing it
new_image:rotate(180) -- Flips image
local new_image2 = Image.new(new_Image)
new_image2:amend(image, 50, 50) -- Takes the first image userdata, and moves it to the position 50, 50 on the current image.
script.Parent.ImageLabel.Image = new_image2
|
|
|
There should be an X and Y position for addText and addShape. |
|
bloccoJoin Date: 2008-08-14 Post Count: 29474 |
Something for drawing any kind of polygon
Something for drawing points
Something for drawing lines |
|
|
Also, tell them to make the image GUIs not blurry. I don't want to face Blocco's painful math anymore. |
|
bloccoJoin Date: 2008-08-14 Post Count: 29474 |
@EmexSSx:
trololol? |
|
|
LPGhatguyForum ModeratorJoin Date: 2008-06-27 Post Count: 4725 |
@Mattchewy
Color.RGB(r, g, b) and Color.CYMK(c, y, m, k) would be nice instead of "hue", and then we could consolodate BrickColor and Color3, though keep those constructors... |
|
|
|
I'd like this alot especially if it worked with guis too. |
|
bloccoJoin Date: 2008-08-14 Post Count: 29474 |
@xSIXx: You're SIX, not SS |
|
SamacadoJoin Date: 2008-02-16 Post Count: 25119 |
Ask 'em to let me edit TextLabel text constraints (i.e, it'll just auto fit text within the box as best it can, and decrease text size if necessary), and to allow them to fit multiple lines of strings in one label.
I could script it, but I really don't want to go through all these screen size possibilities. |
|
XlegoXJoin Date: 2008-06-16 Post Count: 14955 |
An image is tricky design-wise though.
If you make it a simple data it has to be atomic, however you obviously can't make it atomic. Changes would have to be made to the way basic data types are handled in order to have a non-atomic simple data type.
If you make it an instance it has to replicate. How do you make it replicate? Do you send huge amounts of pixel data back and forth, and thus kill drawing performance, or allow longer latency and only pass the commands used to do the drawing, not the pixel changes?
My current request is to provide a mechanism of sub-texture coordinates for AssetIDs which are images, since that's a really good feature cost-of-production vs benefits wise. Something like this:
www.roblox.com/Asset/?id=2453453&texx=0.5&texy=0.5&texw=0.5&texh=0.5
I think an image API should be left alone for now until it can be done right. |
|