Platforms to show: All Mac Windows Linux Cross-Platform
/Picture/Picture blending/blend with plugin
Required plugins for this example: MBS Picture Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Picture/Picture blending/blend with plugin
This example is the version from Wed, 14th May 2019.
Project "blend with plugin.xojo_binary_project"
Class main Inherits Window
Control scr Inherits Canvas
ControlInstance scr Inherits Canvas
EventHandler Sub Paint(g As Graphics, areas() As REALbasic.Rect)
if img_res <> nil then
g.drawpicture img_res,0,0
end if
End EventHandler
End Control
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action()
quit
End EventHandler
End Control
Control sld Inherits Slider
ControlInstance sld Inherits Slider
EventHandler Sub ValueChanged()
img_proc sld.value
End EventHandler
End Control
EventHandler Sub Open()
img_a = new Picture(200,200,32)
img_a.graphics.drawpicture b1,0,0
img_b = new Picture(200,200,32)
img_b.graphics.drawpicture b2,0,0
img_proc sld.value
img_show
End EventHandler
Sub img_proc(bal as integer)
dim aa,bb as double
dim t,i as integer
aa=bal/255.0
bb=1.0-aa
t=ticks
for i=1 to 100
img_res=BlendPicturesMBS(img_a,aa,img_b,bb)
next
Title=str(ticks-t)
img_show
End Sub
Sub img_show()
scr.Invalidate
End Sub
Property Protected img_a As picture
Property Protected img_b As picture
Property Protected img_res As picture
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "Ablage"
MenuItem FileQuit = "Beenden"
MenuItem UntitledMenu7 = ""
MenuItem UntitledMenu0 = "Bearbeiten"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Ausschneiden"
MenuItem EditCopy = "Kopieren"
MenuItem EditPaste = "Einfügen"
MenuItem EditClear = "Löschen"
MenuItem UntitledMenu6 = ""
MenuItem UntitledMenu5 = ""
MenuItem UntitledMenu4 = ""
End MenuBar
Class App Inherits Application
End Class
ExternalFile B1
End ExternalFile
ExternalFile B2
End ExternalFile
End Project
See also:
- /Picture/Picture blending/blend with mask
- /Picture/Picture blending/blend without plugin
- /Picture/Picture Blur
- /Picture/Picture Combine
- /Picture/Picture Combine Test
- /Picture/Picture Copy Fast Test
- /Picture/Picture Hash/Picture Hash
- /Picture/Picture MinMax/mmx_demo
- /Picture/Picture Scale/Picture.ScaleMBS
- /Picture/Picture Scale/Scale Test
The items on this page are in the following plugins: MBS Picture Plugin.