GDIPlusX Sample: Gradient SCREEN Fill

DO (LOCFILE("system.app"))

LOCAL oBMP AS xfcBitmap
LOCAL oGFX AS xfcGraphics
LOCAL oBrush AS xfcLinearGradientBrush

WITH _SCREEN.System.Drawing
   oBmp = .Bitmap.New(1, _SCREEN.Height)
   oGfx = .Graphics.FromImage(oBMP)
   oBrush = .Drawing2D.LinearGradientBrush.New( ;
                  .Rectangle.New(0,0,1,_SCREEN.Height), ;
                  .Color.Blue, ;
                  .Color.DarkGreen, ;
                  .Drawing2D.LineargradientMode.Vertical )

   oGfx.FillRectangle(oBrush, 0,0, 1, _SCREEN.Height)
   oBmp.Save("backfill.bmp",.Imaging.ImageFormat.Bmp)

   _SCREEN.Picture = "backfill.bmp"

ENDWITH

Last edited Jan 8, 2008 at 11:57 AM by binarybo, version 10

Comments

No comments yet.