Platforms to show: All Mac Windows Linux Cross-Platform

/Images/LargePicture/PictureMBS mirror and rotate


Required plugins for this example: MBS Images Plugin, MBS Main Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Images/LargePicture/PictureMBS mirror and rotate

This example is the version from Sun, 17th Mar 2012.

Project "PictureMBS mirror and rotate.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() Current=new PictureMBS(logo.Width,logo.Height, PictureMBS.ImageFormatRGB) call Current.CopyPixels(logo) update End EventHandler
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
EventHandler Sub Action() Current=new PictureMBS(logo.Width,logo.Height, PictureMBS.ImageFormatRGBA) call Current.CopyPixels(logo) update End EventHandler
End Control
Control PushButton3 Inherits PushButton
ControlInstance PushButton3 Inherits PushButton
EventHandler Sub Action() Current=new PictureMBS(logo.Width,logo.Height, PictureMBS.ImageFormatG) call Current.CopyPixels(logo) update End EventHandler
End Control
Control PushButton4 Inherits PushButton
ControlInstance PushButton4 Inherits PushButton
EventHandler Sub Action() Current=new PictureMBS(logo.Width,logo.Height, PictureMBS.ImageFormatGA) call Current.CopyPixels(logo) update End EventHandler
End Control
Control PushButton5 Inherits PushButton
ControlInstance PushButton5 Inherits PushButton
EventHandler Sub Action() Current.HMirror update End EventHandler
End Control
Control PushButton6 Inherits PushButton
ControlInstance PushButton6 Inherits PushButton
EventHandler Sub Action() Current.VMirror update End EventHandler
End Control
Control PushButton7 Inherits PushButton
ControlInstance PushButton7 Inherits PushButton
EventHandler Sub Action() if Current.HasGray then Current.GrayChannel.HMirror else Current.GreenChannel.HMirror end if update End EventHandler
End Control
Control Canvas1 Inherits Canvas
ControlInstance Canvas1 Inherits Canvas
End Control
Control PushButton8 Inherits PushButton
ControlInstance PushButton8 Inherits PushButton
EventHandler Sub Action() if Current.HasGray then Current.GrayChannel.VMirror else Current.GreenChannel.VMirror end if update End EventHandler
End Control
Control PushButton9 Inherits PushButton
ControlInstance PushButton9 Inherits PushButton
EventHandler Sub Action() Current.Invert update End EventHandler
End Control
Control PushButton10 Inherits PushButton
ControlInstance PushButton10 Inherits PushButton
EventHandler Sub Action() if Current.HasGray then Current.GrayChannel.Invert else Current.GreenChannel.Invert end if update End EventHandler
End Control
Control PushButton11 Inherits PushButton
ControlInstance PushButton11 Inherits PushButton
EventHandler Sub Action() Current.Rotate180 update End EventHandler
End Control
Control PushButton12 Inherits PushButton
ControlInstance PushButton12 Inherits PushButton
EventHandler Sub Action() current=Current.Rotate90 update End EventHandler
End Control
Control PushButton13 Inherits PushButton
ControlInstance PushButton13 Inherits PushButton
EventHandler Sub Action() current=Current.Rotate270 update End EventHandler
End Control
Control Slider1 Inherits Slider
ControlInstance Slider1 Inherits Slider
EventHandler Sub ValueChanged() RotateButton.Caption=str(Slider1.Value)+"°" End EventHandler
End Control
Control RotateButton Inherits PushButton
ControlInstance RotateButton Inherits PushButton
EventHandler Sub Action() // this is the fill color: dim red as integer = 255 dim green as integer = 0 dim blue as integer = 0 dim alpha as integer = 0 dim gray as integer = 0 current=Current.Rotate(slider1.Value, red, green, blue, alpha, gray) update End EventHandler
End Control
EventHandler Sub Open() dim l as Picture l=LogoMBS(500) logo=new PictureMBS(l) Current=new PictureMBS(logo.Width,logo.Height, PictureMBS.ImageFormatRGB) call Current.CopyPixels(logo) update End EventHandler
Sub update() canvas1.Backdrop=Current.CopyPicture End Sub
Property current As Picturembs
Property logo As PictureMBS
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:

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


The biggest plugin in space...