Plugin Dev Bug (renderer.Fill)

Bugs will be moved here once resolved.

Post » Thu Oct 06, 2011 12:20 pm

I have found what seems to be a bug with renderer.Fill when i used a fill for a plugin where i wanted a simple visual placeholder.

With the Edittime if you have a plugin where you have this -

IDEInstance.prototype.Draw = function(renderer)
{
    renderer.Fill(this.instance.GetBoundingQuad(), cr.RGB(100, 100, 255)) // Currently has a bug
}

If you have that in the plugin and then start a new project and add the plugin you see the blue fill working correctly. However if you create a sprite with a image then add other copies of the plugin with this it will then use the texture from the sprite mixing it with the fill color.

So it seems for some reason it is getting sent the texture from other quads even when something is not using them.

I did some testing with other things and Outline and Line seem to do a very similar thing where they appear darker. Outline also has another bug where it seems to have a pixel missing on the lower left side.

I have a request also, it would be useful to have a extra , available for renderer.Fill etc to set a alpha value. I can't seem to find a way to set a alpha value for them so i think that would be a nice solution.FireLight2011-10-06 12:30:47
B
9
S
3
G
4
Posts: 55
Reputation: 2,607

Post » Sun Oct 09, 2011 7:45 pm

Closing as not a bug: this is by design. If you wish to fill a rectangle with no texture, you must first set the texture to a null texture.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,508

Post » Mon Oct 10, 2011 9:20 am

Thanks for the info, i tried doing as you say however exactly the same thing happens again when i update the code.

IDEInstance.prototype.Draw = function(renderer)
{
    renderer.SetTexture(null);
    renderer.Fill(this.instance.GetBoundingQuad(), cr.RGB(100, 100, 255)) // Currently has a bug
}

I originally did not use the texture flag as i found it automatically opened the image editor but i tested adding that and it unfortunately it did not make much difference either.

I have had the fill working from the start but it's always inheriting the Sprite objects image whatever i try. I am guessing i have done something wrong still, do you have a simple code snippet if possible? thanks
B
9
S
3
G
4
Posts: 55
Reputation: 2,607


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest