Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

/Images/LargePicture/PictureMBS ApplyMatrix Example
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 ApplyMatrix Example
This example is the version from Sun, 17th Mar 2012.
Project "PictureMBS ApplyMatrix Example.rbp"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control Canvas1 Inherits Canvas
ControlInstance Canvas1 Inherits Canvas
End Control
Control Slider1 Inherits Slider
ControlInstance Slider1 Inherits Slider
EventHandler Sub ValueChanged() run End EventHandler
End Control
Control Label1 Inherits Label
ControlInstance Label1 Inherits Label
End Control
EventHandler Sub Open() run End EventHandler
Sub Run() dim n as integer = Slider1.Value dim n1 as integer = n-1 dim matrix(30*30) as integer dim i as integer = 0 for y as integer = 0 to n1 for x as integer = 0 to n1 matrix(i)=1 // fill matrix i = i + 1 next next dim s,d as PictureMBS // make source and dest somewhere s = new PictureMBS(LogoMBS(500)) d = new PictureMBS(500, 500, PictureMBS.ImageFormatRGB) // Blur with 25x25 Matrix d=s.ApplyMatrix(d, n, matrix, 0, 1.0/n/n) canvas1.Backdrop = d.CopyPicture label1.text = str(n) End Sub
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
End Project

See also:

Feedback, Comments & Corrections

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

MBS Xojo blog