mainSGE Game Engine - Support: sr #109500, sge.gfx.Sprite.draw_rectangle...

 
 

sr #109500: sge.gfx.Sprite.draw_rectangle fails to work with some images.

Submitter:  Layla Marchant <onpon4>
Submitted:  Thu 03 May 2018 03:30:16 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  4 - Important Status:  None
Privacy:  Public Assigned to:  onpon4
Open/Closed:  Open Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 03 May 2018 03:30:16 AM UTC, original submission:  

The pattern seems to be non-alpha images, and I've narrowed it down to line 912 of gfx.py:

dsurf.blit(stamp, (0, 0), None, pygame_flags)

But I have no idea why it's doing what it's doing, or how to fix it.

Behavior: When you try to draw just an outline on a non-alpha image, it also draws a black box on the image, underneath the outline. It's as if the "stamp" which actually puts the rectangle on the sprite were non-alpha, but it's explicitly created as alpha.

Even weirder: use "convert_alpha" on the "stamp", and the rectangle drawing stops working on non-alpha images entirely.

Since the source of the error is blitting the "stamp", this almost certainly affects other drawing methods as well.

Layla Marchant <onpon4>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by onpon4 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code