Ticket #18 (defect)
Opened 2 years ago
Last modified 2 years ago
Alpha and text drawing
Status: closed (fixed)
| Reported by: | Sakya | Assigned to: | fraca7 |
|---|---|---|---|
| Priority: | major | Component: | psp2d |
| Version: | current | Keywords: | |
| Cc: |
Drawing text on an image with alpha doesn't work properly, while drawing it to the screen works fine. Try this source, you'll see gray box around the text.
import psp2d
screen = psp2d.Screen()
font = psp2d.Font('font.png')
background_image = psp2d.Image(480,272)
background_image.clear(psp2d.Color(0,0,0))
#Loop di visualizzazione:
while True:
#Sfondo:
screen.blit(background_image, 0, 0, background_image.width, background_image.height, 0, 0)
image1 = psp2d.Image(100, 100)
image1.clear(psp2d.Color(100,100,100, 200))
font.drawText(image1, 10, 10, "Test")
screen.blit(image1, 0, 0, image1.width, image1.height, 10, 10)
image2 = psp2d.Image(100, 100)
image2.clear(psp2d.Color(100,100,100, 200))
screen.blit(image2, 0, 0, image2.width, image2.height, 10, 150)
font.drawText(screen, 20, 160, "Test")
screen.swap()
Change History
05/01/06 09:19:27: Modified by fraca7
- status changed from new to closed.
- resolution set to fixed.
