Platforms to show: All Mac Windows Linux Cross-Platform
/Tiff/Tiff Picture Save with Mask
Feedback.
Function:
You find this example project in your Plugins Download as a Realbasic project file within the examples folder: /Tiff/Tiff Picture Save with Mask
This example is the version from Tue, 11th Jan 2010.
Notes: Last modified: Tue, 11th Jan 2010
Feedback.
Function:
You find this example project in your Plugins Download as a Realbasic project file within the examples folder: /Tiff/Tiff Picture Save with Mask
This example is the version from Tue, 11th Jan 2010.
Notes: Last modified: Tue, 11th Jan 2010
Class Window1
Inherits Window
// Controls
ControlInstance
End ControlInstance
ControlInstance
Sub Action() Handles Event
SaveRGB
End Sub
End ControlInstance
// Properties
Protected Dim current As picture
Protected Dim mask As Picture
// Event implementations
Sub Open()
dim g as Graphics
mask=NewPicture(300,300,32)
g=mask.Graphics
g.ForeColor=&c000000
g.FillRect 0,0,300,300
g.ForeColor=&cFFFFFF
g.FillOval 0,0,300,300
dim p as Picture
p=NewPicture(300,300,32)
g=p.Graphics
g.ForeColor=&cFF0000
g.FillRect 0,0,100,100
g.ForeColor=&c00FF00
g.FillRect 100,0,100,100
g.ForeColor=&c0000FF
g.FillRect 200,0,100,100
g.ForeColor=&cFFFF00
g.FillRect 0,100,100,100
g.ForeColor=&c00FFFF
g.FillRect 100,100,100,100
g.ForeColor=&cFF00FF
g.FillRect 200,100,100,100
g.ForeColor=&c000000
g.FillRect 0,200,100,100
g.ForeColor=&c777777
g.FillRect 100,200,100,100
g.ForeColor=&cFFFFFF
g.FillRect 200,200,100,100
p.Mask.Graphics.DrawPicture mask.InvertMBS,0,0
current=p
run
End Sub
// Methods
Protected Sub run()
Canvas1.Backdrop=current
End Sub
Protected Sub SaveRGB()
dim f as FolderItem
dim t as TiffPictureMBS
f=GetsaveFolderItem("image/tiff","test.tiff")
if f<>Nil then
t=new TiffPictureMBS
if t.Create(f) then
t.Pict=current
t.Mask = mask
if t.WriteRGB then
MsgBox "Wrote tiff file "+f.name
else
MsgBox "Failed to write tiff file "+f.Name
end if
t.Close
end if
end if
End Sub
End Class
Class App
Inherits Application
End Class
See also:
Links
MBS Realbasic Chart Plugins - Pfarrgemeinde St. Arnulf Nickenich