Platforms to show: All Mac Windows Linux Cross-Platform

/GraphicsMagick/GraphicsMagick/alpha test


Required plugins for this example: MBS GraphicsMagick Plugin

Last modified Mon, 5th May 2019.

You find this example project in your MBS Xojo Plugin download as a Xojo project file within the examples folder: /GraphicsMagick/GraphicsMagick/alpha test

Download this example: alpha test.zip

Project "alpha test.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control Slider1 Inherits Slider
ControlInstance Slider1 Inherits Slider
EventHandler Sub ValueChanged() redraw End EventHandler
End Control
Control Canvas1 Inherits Canvas
ControlInstance Canvas1 Inherits Canvas
EventHandler Sub Paint(g As Graphics, areas() As REALbasic.Rect) #pragma Unused areas draw g End EventHandler
End Control
Sub Draw(out as graphics) dim g as new GMGeometryMBS(500,500) dim c as new GMColorRGBMBS("white") // white dim image as new GMImageMBS(g, c) dim red as new GMColorRGBMBS("red") dim green as new GMColorRGBMBS("green") red.alpha = Slider1.Value/100.0 green.alpha = Slider1.Value/100.0 image.strokeColor = red // Outline color image.fillColor = green // Fill color image.strokeWidth = 5 dim draw as GMGraphicsMBS = image.Graphics // Draw a circle draw.Circle(250, 250, 120, 150) draw.Draw out.DrawPicture image.copyPicture,0,0 End Sub
Sub Redraw() #if RBVersion >= 2013 then canvas1.Invalidate #else canvas1.Refresh #endif End Sub
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
End Project

Download this example: alpha test.zip

The items on this page are in the following plugins: MBS GraphicsMagick Plugin.


The biggest plugin in space...