If I remember correctly it was the physics engine which could only handle 6 points, not SDL. (and I'm pretty sure I do remember correctly )Robin wrote:About that last one: I thought SDL could only handle polygons with up to six joints. I believe it's on this forum somewhere.
LOVEly Eyes (GUI Toys) update of 2009-06-26
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: LOVEly Eyes (GUI Toys) update of 2009-04-29
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: LOVEly Eyes (GUI Toys) update of 2009-04-29
In that case, I'm probably mistaken.bartbes wrote:If I remember correctly it was the physics engine which could only handle 6 points, not SDL. (and I'm pretty sure I do remember correctly )Robin wrote:About that last one: I thought SDL could only handle polygons with up to six joints. I believe it's on this forum somewhere.
Help us help you: attach a .love.
- athanazio
- Citizen
- Posts: 96
- Joined: Fri Apr 10, 2009 3:12 am
- Location: Rio de Janeiro - Brazil
- Contact:
Re: LOVEly Eyes (GUI Toys) update of 2009-04-29
#fill polygon
look at this
http://love2d.org/docs/love_physics.html
http://love2d.org/docs/love_graphics_polygon_1.html
I believe that I will end up splitting the polygon in triangles, that would be good also to use the
result in a physics simulation...
#gradient
and about the gradient, I will try with thicker lines
2 point lines for example to see if it works
cheers
look at this
http://love2d.org/docs/love_physics.html
in the polygon docs dont say anything about limitation* Only convex shapes are supported.
* The max vertex count for on a single polygon is 8.
* There are 16 shape categories.
http://love2d.org/docs/love_graphics_polygon_1.html
I believe that I will end up splitting the polygon in triangles, that would be good also to use the
result in a physics simulation...
#gradient
and about the gradient, I will try with thicker lines
2 point lines for example to see if it works
cheers
Nothing is simple but everything is possible.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: LOVEly Eyes (GUI Toys) update of 2009-04-29
This thread is one big conversation between you guys (athanazio and robin), but I wanted to report gradient fill does work on Ubuntu. (so maybe it's Xubuntu related, or it's the driver)
- athanazio
- Citizen
- Posts: 96
- Joined: Fri Apr 10, 2009 3:12 am
- Location: Rio de Janeiro - Brazil
- Contact:
Re: LOVEly Eyes (GUI Toys) update of 2009-04-29
but does the gradient work on other linuxes ?
just to know If I should try to change the implementation or not
just to know If I should try to change the implementation or not
Nothing is simple but everything is possible.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: LOVEly Eyes (GUI Toys) update of 2009-04-29
Well, congratulations. I don't know why, but setting LineWidth to 2 fixed the gradient issue on my Xubuntu boot.athanazio wrote:and about the gradient, I will try with thicker lines
2 point lines for example to see if it works
While looking at the gradient code, I saw that the horizontal and vertical gradient functions are nearly identical. Wouldn't it be better (i.e.: easier to debug and upgrade) to put it in one function. I uploaded a file to demonstrate it.
EDIT: there was some trouble uploading, but it's up now.
- Attachments
-
- gradient.lua
- (3.32 KiB) Downloaded 177 times
Help us help you: attach a .love.
Re: LOVEly Eyes (GUI Toys) update of 2009-05-03
Hmm... if you could 'cookie cut' images then you could make gradients of a single color just by cookie cutting the image into , e.g star , and layer it over the star. The image is just a semi-transparent gradient from black to white. Using images would save some processor time instead of having to draw a gradient line by line, imo. But it can't do different sets of colors...
I like the multiline edits; they're quite cute.
I like the multiline edits; they're quite cute.
- athanazio
- Citizen
- Posts: 96
- Joined: Fri Apr 10, 2009 3:12 am
- Location: Rio de Janeiro - Brazil
- Contact:
Re: LOVEly Eyes (GUI Toys) update of 2009-05-03
#1 gradient merge of code
#2 gradient fill for the stars
also fixed the way the gradient were working for the stars, internally a matrix o points is created, so the gradient knows where each line starts and ends, but in the case of the stars ... we have some little problems like the following example
100000001000001000001
that could be understood as 2 blocks on the left and right ... or a tiny point on the left a block in the middle anda point at the right, as we had only zeros and 1 there were no identification of the outside of the polygon, so I add the "2" to the matrix that is the outside of the polygon by making fill with 2 until find "1" from the 4 directions of the bounding box of the polygon. doing like this the sample become this
122222221000001222221
and indicates the external and internal points.
#solid color fill of stars
oh well the stars were just with some sort of headache, so I just split in smaller chunks to make the filled polygon drawer life easier hehehe, cut the triangles, and the inner polygon, worked very fine !!
here is the current version and a screenshot
good idea but the code got a little complex for my little brain ... and broke some gradients hehehe, so we will keep the linewith=2 and keep separate for nowRobin wrote:While looking at the gradient code, I saw that the horizontal and vertical gradient functions are nearly identical. Wouldn't it be better (i.e.: easier to debug and upgrade) to put it in one function. I uploaded a file to demonstrate it.
#2 gradient fill for the stars
also fixed the way the gradient were working for the stars, internally a matrix o points is created, so the gradient knows where each line starts and ends, but in the case of the stars ... we have some little problems like the following example
100000001000001000001
that could be understood as 2 blocks on the left and right ... or a tiny point on the left a block in the middle anda point at the right, as we had only zeros and 1 there were no identification of the outside of the polygon, so I add the "2" to the matrix that is the outside of the polygon by making fill with 2 until find "1" from the 4 directions of the bounding box of the polygon. doing like this the sample become this
122222221000001222221
and indicates the external and internal points.
#solid color fill of stars
oh well the stars were just with some sort of headache, so I just split in smaller chunks to make the filled polygon drawer life easier hehehe, cut the triangles, and the inner polygon, worked very fine !!
here is the current version and a screenshot
Nothing is simple but everything is possible.
- athanazio
- Citizen
- Posts: 96
- Joined: Fri Apr 10, 2009 3:12 am
- Location: Rio de Janeiro - Brazil
- Contact:
Re: LOVEly Eyes (GUI Toys) update of 2009-05-03
excellent idea ! I will think some sort of caching to avoid the calculation each time of the linesappleide wrote:Hmm... if you could 'cookie cut' images then you could make gradients of a single color just by cookie cutting the image into , e.g star , and layer it over the star. The image is just a semi-transparent gradient from black to white. Using images would save some processor time instead of having to draw a gradient line by line, imo. But it can't do different sets of colors...
would be great to have a way to build the images in memory and just use it,
instead of loading from the file everytime
after I make the text ballon componentappleide wrote:I like the multiline edits; they're quite cute.
I believe will be the time to add the scroll bar to the multiline edit hehehehe
cheers
Nothing is simple but everything is possible.
Re: LOVEly Eyes (GUI Toys) update of 2009-05-03
... this is awesome!
Who is online
Users browsing this forum: No registered users and 7 guests