Platforms to show: All Mac Windows Linux Cross-Platform
Required plugins for this example: 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 Blur
This example is the version from Wed, 14th May 2019.
Project "Picture Blur.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control Canvas1 Inherits Canvas
ControlInstance Canvas1 Inherits Canvas
EventHandler Sub Paint(g As Graphics, areas() As REALbasic.Rect)
draw g,ein
End EventHandler
End Control
Control Canvas2 Inherits Canvas
ControlInstance Canvas2 Inherits Canvas
EventHandler Sub Paint(g As Graphics, areas() As REALbasic.Rect)
draw g,mbs
End EventHandler
End Control
EventHandler Function MouseDown(X As Integer, Y As Integer) As Boolean
lx = x
ly = y
Return true
End EventHandler
EventHandler Sub MouseDrag(X As Integer, Y As Integer)
Dim dx As Integer = x-lx
dim dy as integer = y-ly
relx = relx + dx
rely = rely + dy
lx = x
ly = y
Title = str(relx)+" "+str(rely)
Canvas1.invalidate
Canvas2.Invalidate
'draw Canvas1.Graphics, ein
'draw Canvas2.Graphics, mbs
End EventHandler
EventHandler Sub Open()
dim l as Picture = LogoMBS(5000)
dim t1 as integer = ticks
// Einhugur Plugins
const HaveEinhugurPlugins = false
#if HaveEinhugurPlugins
dim e as new GaussianBlur(4)
dim q as Picture = e.applyEffect(l)
t1 = ticks - t1
EIN = q
#endif
dim t2 as integer = ticks
// MBS Plugins
dim d as Picture = l.BlurMBS(2)
t2 = ticks - t2
MBS = d
Title = str(t1)+" "+str(t2)
RelX = -1000
RelY = -1000
End EventHandler
Sub draw(g as Graphics, p as Picture)
if p<>nil then
g.DrawPicture p, RelX, RelY
end if
End Sub
Property EIN As Picture
Property MBS As Picture
Property RelX As Integer
Property RelY As Integer
Property lx As Integer
Property ly As Integer
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:
- /Picture/Picture Blending test
- /Picture/Picture blending/blend with plugin
- /Picture/Picture Combine Test
- /Picture/Picture Difference
- /Picture/Picture manipulation
- /Picture/Picture MinMax/mmx_demo
- /Picture/Picture MinMax/mmx_demo with plugin
- /Picture/Picture Scale/Scale Test
- /Picture/Picture to Binary Data Test
- /Picture/Picture To Memoryblock
The items on this page are in the following plugins: MBS Picture Plugin.