Seite 1 von 1

Frage wegen METHOD XbpIcon:Draw()

Verfasst: Do, 16. Aug 2018 7:18
von AUGE_OHR
moin,

in \SOURCE\SYS\xbparts.prg findet man den Source zu

Code: Alles auswählen

METHOD XbpIcon:Draw( oPS, aTargetRect, nState )
an Ende der Methode passiert nun etwas "komisches" ... :shock:

Code: Alles auswählen

   oBmpTmp := XbpBitmap():New():Create( oPS )
   oPSTmp  := XbpPresSpace():New():Create()
   oBmpTmp:PresSpace( oPSTmp )
   oBmpTmp:Make( ::XSize, ::YSize )
   oBmpTmp:TransparentClr := oBmpTmp:GetDefaultBGColor()
// Icon
   ::Draw( oPSTmp, {0,0}, nState )
   oPSTmp:Destroy()
// Bitmap   
   lReturn := oBmpTmp:Draw( oPS, aTargetRect,,, GRA_BLT_BBO_IGNORE )
   oBmpTmp:Destroy()

RETURN lReturn
es wird in einer Icon Method ein Bitmap erzeugt ?
dann wird das Icon "in" das Bitmap gemalt ?
für die endgültige Anzeige wird das Bitmap "in" das oPS gemalt. :roll:

warum der ganze Aufstand :?:
ist das ein Workaround um bei Icons Transparency zu simulieren :?: