SetGadgetAttribute() #PB_Canvas_Image

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

SetGadgetAttribute() #PB_Canvas_Image

Post by IdeasVacuum »

Using the SetGadgetAttribute() method to apply an image to a Canvas is fast, but limited. It would be great if the function could be enhanced to use the DrawingMode Constants, especially #PB_2DDrawing_AlphaBlend
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
STARGÅTE
Addict
Addict
Posts: 2227
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: SetGadgetAttribute() #PB_Canvas_Image

Post by STARGÅTE »

then use a drawing function ^^

Code: Select all

If StartDrawing(CanvasOutput(#Gadget))
	DrawingMode(#PB_2DDrawing_AlphaBlend)
	DrawImage(ImageID, X, Y)
	StopDrawing()
EndIf
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
Post Reply