Platforms to show: All Mac Windows Linux Cross-Platform
Required plugins for this example: MBS Picture Plugin, MBS Main Plugin
Last modified Sun, 17th Mar 2012.
You find this example project in your MBS Xojo Plugin download as a Xojo project file within the examples folder: /Picture/GrayScaleMBS
Download this example: GrayScaleMBS.zip
Project "GrayScaleMBS.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control out Inherits Canvas
ControlInstance out(0) Inherits Canvas
ControlInstance out(1) Inherits Canvas
ControlInstance out(2) Inherits Canvas
ControlInstance out(3) Inherits Canvas
EventHandler Sub MouseMove(index as Integer, X As Integer, Y As Integer)
Update x,y
End EventHandler
End Control
Control info Inherits Label
ControlInstance info(0) Inherits Label
ControlInstance info(1) Inherits Label
ControlInstance info(2) Inherits Label
ControlInstance info(3) Inherits Label
End Control
EventHandler Sub Open()
dim logo as Picture = LogoMBS(500)
for i as integer = 0 to 3
p(i) = logo.GrayScaleMBS(i)
out(i).Backdrop = p(i)
next
End EventHandler
Protected Sub Update(x as integer, y as integer)
for i as integer=0 to 3
dim c as color = p(i).RGBSurface.pixel(x,y)
info(i).Text = str(c.Red)+" "+str(c.Green)+" "+str(C.Blue)
next
End Sub
Property Protected p(3) As Picture
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project
Download this example: GrayScaleMBS.zip
The items on this page are in the following plugins: MBS Picture Plugin.