6/3/2023 0 Comments Purebasic absolute value![]() ![]() ![]() VectorSourceGradientColor ( $ff00ffff, 0.8 ) VectorSourceGradientColor ( $ff008800, 0.0 ) VectorSourceColor ( $ffffffff ):StrokePath ( 1 )ĪddPathBox ( 6, 10, 4, 4 ):VectorSourceColor ( $ff8888ff ):FillPath ( ) Case 4 VectorSourceColor ( $ffaaaaff ):FillPath ( #PB_Path_Preserve ) VectorSourceColor ( $ffffffff ):StrokePath ( 2 ) Case 3 VectorSourceGradientColor ( $ff886666, 1.0 ) VectorSourceGradientColor ( $ffffaaaa, 0.4 ) VectorSourceGradientColor ( $ffffffff, 0.0 ) VectorSourceCircularGradient ( 8- 3, 8- 3, 10 ) ![]() StartVectorDrawing (ImageVectorOutput ( 10 n ) ) Select n With IFpos (IFidx (nn-n ) ) If Alpha (IFbmp (\i,\j ) ):DrawText (x \i,y \j,text,IFbmp (\i,\j ) ): EndIf EndWith Next EndProcedure # Procedure exemple ( ) EnableExplicit Protected i,j,n,idx= 800,idy= 600 For n= 0 To 7ĬreateImage ( 10 n, 16, 16, 32, #PB_Image_Transparent ) Sortidx (IFdis ( ),IFidx ( ) ) EndProcedure Procedure DrawTextIF (x,y,text.s ) Protected n,nn=ArraySize (IFidx ( ) )ÄrawingMode ( #PB_2DDrawing_Transparent | #PB_2DDrawing_AlphaBlend ) For n= 0 To nn Protected idx=ImageWidth (image ): If centerX< 0:centerX=idx/ 2: EndIf Protected idy=ImageHeight (image ): If centery< 0:centery=idy/ 2: EndIf Protected Dim IFdis.l (idx * idy- 1 ) Global Dim IFidx.l (idx * idy- 1 ) Global Dim IFbmp.l (idx- 1,idy- 1 ) Global Dim IFpos.IFsij (idx * idy- 1 )ÄrawingMode ( #PB_2DDrawing_AllChannels ) For j= 0 To idy- 1 For i= 0 To idx- 1 V=t (idx (j ) ) If v ![]()
0 Comments
Leave a Reply. |