Autore Topic: Se Picture.Fill() non supporta la trasparenza  (Letto 387 volte)

Offline vuott

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 11.269
  • Ne mors quidem nos iunget
    • Mostra profilo
Se Picture.Fill() non supporta la trasparenza
« il: 10 Ottobre 2012, 23:22:10 »
Nella Mailing List Internazionale è comparso un messaggio inerente alla trasparenza con Picture.Fill(). Riporto di seguito sia il messaggio che la risposta di Minisini:

« I'd like to fill (and clear) a picture with a transparent (or
semi-transparent) color, but the Fill() method does not seems to take
the alpha part into account (Color.Transparent gives me a plain white
background). I attached a little test project.

Is it a bug, or is it a known problem with the Qt API ? (as the GTK+
renders it correctly)

Regards,
Adrien.
»


« Picture cannot have an alpha channel, except with gb.qt4, and only if
you convert an image with alpha channel to a picture. Because in that
case Qt uses the XRender extension.

GTK+ does not use XRender, so I implemented Picture differently. Picture
and Image are actually the same underlying object, and the image is
converted to a picture internally only if really needed.

I have to implement that behaviour in gb.qt4 too, so that both
components are compatible.

Regards,

--
Benoît Minisini
»
« Chiunque, non ricorrendo lo stato di necessità, nel proprio progetto Gambas fa uso delle istruzioni Shell o Exec, è punito con la sanzione pecuniaria da euro 20,00 a euro 60,00. »