Platforms to show: All Mac Windows Linux Cross-Platform
/GraphicsMagick/GraphicsMagick/MontageTest
Required plugins for this example: MBS Main Plugin, MBS GraphicsMagick Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /GraphicsMagick/GraphicsMagick/MontageTest
This example is the version from Thu, 3rd Feb 2016.
Project "MontageTest.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class MainWindow Inherits Window
Control btnAddFrame Inherits PushButton
ControlInstance btnAddFrame Inherits PushButton
EventHandler Sub Action()
// make picture
dim logo as Picture = LogoMBS(500)
dim img as New GM16ImageMBS(logo)
img.label("Sample label")
// Put the current image into the array
StackingFrames.insert(img)
// show result
dim resultImages as GM16ImageArrayMBS = StackingFrames.montageImages(StackingMontage)
dim pic As GM16ImageMBS = resultImages.Image(0)
'cvsStackingThumbs.Height = pic.height
'cvsStackingThumbs.Width = pic.width
'cvsStackingThumbs.Backdrop = pic.CopyPicture
Self.Backdrop = pic.CopyPicture
End EventHandler
End Control
EventHandler Sub Open()
// build montage
StackingMontage = New GM16MontageMBS
StackingMontage.backgroundColor = New GM16ColorMBS(&cE7E7E7)
StackingMontage.fillColor = New GM16ColorMBS(&c000000)
StackingMontage.tile = New GM16GeometryMBS("3x3")
StackingMontage.geometry = New GM16GeometryMBS("160x120+5+5")
#if TargetWin32 then
StackingMontage.font = "Arial"
#else
StackingMontage.font = "Helvetica"
#endif
StackingMontage.pointSize = 12
StackingMontage.title = "Title goes here"
// make picture
dim logo as Picture = LogoMBS(500)
dim img as New GM16ImageMBS(logo)
img.label("Sample label")
// Put the current image into the array
StackingFrames = new GM16ImageArrayMBS
StackingFrames.insert(img)
// show result
dim resultImages as GM16ImageArrayMBS = StackingFrames.montageImages(StackingMontage)
Self.Backdrop = resultImages.Image(0).CopyPicture
End EventHandler
Property Private StackingFrames As GM16ImageArrayMBS
Property Private StackingMontage As GM16MontageMBS
End Class
MenuBar MainMenuBar
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem EditSeparator1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem EditSeparator2 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
End Project
The items on this page are in the following plugins: MBS GraphicsMagick Plugin.