Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/Picture/Picture Difference
Function:
Required plugins for this example: MBS Images Plugin, MBS Main Plugin, MBS Picture Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Picture/Picture Difference
This example is the version from Sun, 17th Mar 2012.
Project "Picture Difference.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control CheckSquared Inherits CheckBox
ControlInstance CheckSquared Inherits CheckBox
EventHandler Sub Action() run End EventHandler
End Control
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control Slider1 Inherits Slider
ControlInstance Slider1 Inherits Slider
EventHandler Sub ValueChanged() StaticText2.text=str(me.Value)+"%" run End EventHandler
End Control
Control StaticText2 Inherits Label
ControlInstance StaticText2 Inherits Label
End Control
Control Canvas1 Inherits Canvas
ControlInstance Canvas1 Inherits Canvas
End Control
Control Canvas2 Inherits Canvas
ControlInstance Canvas2 Inherits Canvas
End Control
Control CheckBox2 Inherits CheckBox
ControlInstance CheckBox2 Inherits CheckBox
EventHandler Sub Action() run End EventHandler
End Control
EventHandler Sub Open() p=LogoMBS(500) run End EventHandler
Sub run() dim j as string = PictureToJPEGStringMBS(p, Slider1.Value) dim c as Picture = JPEGStringToPictureMBS(j,true) dim d as Picture if CheckBox2.Value then if CheckSquared.Value then d=c.CombineMBS(9, p) else d=c.CombineMBS(8, p) end if else if CheckSquared.Value then d=c.CombinePixelMBS(6, p) else d=c.CombinePixelMBS(5, p) end if end if canvas1.Backdrop=c canvas2.Backdrop=d End Sub
Property p 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

See also:

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins