Hello Guest

Author Topic: Corners of an Image  (Read 2443 times)

0 Members and 1 Guest are viewing this topic.

Whatzgames

  • Member
  • Posts: 1
    • View Profile
Corners of an Image
« on: February 18, 2015, 01:16:21 PM »
Hey,

just a small idea, where you could select the coordinates of the corners of an image
e.g.
Code: [Select]
image1.Corner.TopLeft/TopRight/...[/font]


and use the Util.Clamp function.
e.g.
Code: [Select]
image(X,Y/CORNER) = Util.Clamp(image1.TopLeft, image2.TopLeft or something like image2(X, Y);

Just saying :)



Best regards

Whatgames
« Last Edit: February 18, 2015, 01:20:33 PM by Whatzgames »

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: Corners of an Image
« Reply #1 on: February 18, 2015, 03:55:17 PM »
Are you imagining these being vector2s?  Graphic does have properties for TextureTop, Bottom, Left and Right, so you could derive these yourself using those.  I'll think about adding these, it does seem a little odd because Graphics (and Images) are relative to the Entity in their coordinate space (like the TopLeft of an Image would most likely just be 0, 0, since it's relative to the Entity most of the time.)