Platforms to show: All Mac Windows Linux Cross-Platform
/GraphicsMagick/GraphicsMagick/Crop
Required plugins for this example: MBS GraphicsMagick Plugin, MBS Main Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /GraphicsMagick/GraphicsMagick/Crop
This example is the version from Sun, 17th Mar 2012.
Project "Crop.xojo_binary_project"
FileTypes
Filetype application/binary
End FileTypes
Class Window1 Inherits Window
EventHandler Sub Open()
dim p as Picture = LogoMBS(500)
dim g as new GMGeometryMBS(500,500)
dim c as new GMColorRGBMBS(1.0,0.0,0.0) // red
dim image as new GMImageMBS(g, c)
const TrueColorType=6
// Ensure that there are no other references to this image.
image.modifyImage
// Set the image type to TrueColor DirectClass representation.
image.type=TrueColorType
image.SetPicture p,0,0
image.crop new GMGeometryMBS(300,300,100,100) // width, height, x, y
Backdrop=image.CopyPicture(0,0,image.size.width, image.size.height)
End EventHandler
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project
See also:
The items on this page are in the following plugins: MBS GraphicsMagick Plugin.