Platforms to show: All Mac Windows Linux Cross-Platform

/DynaPDF/DynaPDF Makros


Required plugins for this example: MBS DynaPDF Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /DynaPDF/DynaPDF Makros

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

Project "DynaPDF Makros.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control list Inherits Listbox
ControlInstance list Inherits Listbox
End Control
EventHandler Sub Open() dim x as integer // R 0 to 255, B 0 to 255, G 0 to 255 dim rgb as integer = DynapdfMBS.RGB(5,6,7) List.AddRow "RGB(5,6,7): "+hex(rgb) x = DynapdfMBS.RofRGB(rgb) if x <> 5 then list.addrow "RofRGB failed: 5 <> "+str(x) end if x = DynapdfMBS.GofRGB(rgb) if x <> 6 then list.addrow "GofRGB failed: 6 <> "+str(x) end if x = DynapdfMBS.BofRGB(rgb) if x <> 7 then list.addrow "BofRGB failed: 7 <> "+str(x) end if // L 0 to 100, a -128 to 127, b -128 to 127 dim lab as integer = DynapdfMBS.LAB(1,2,3) List.AddRow "LAB(1,2,3): "+hex(lab) x = DynapdfMBS.LOfLAB(lab) if x <> 1 then list.addrow "RofRGB failed: 1 <> "+str(x) end if x = DynapdfMBS.AOfLAB(lab) if x <> 2 then list.addrow "GofRGB failed: 2 <> "+str(x) end if x = DynapdfMBS.BOfLAB(lab) if x <> 3 then list.addrow "BofRGB failed: 3 <> "+str(x) end if lab = DynapdfMBS.LAB(50,0,-90) /// blue List.AddRow "LAB(50,0,-90): "+hex(lab) x = DynapdfMBS.LOfLAB(lab) if x <> 50 then list.addrow "LOfLAB failed: 50 <> "+str(x) end if x = DynapdfMBS.AOfLAB(lab) if x <> 0 then list.addrow "AOfLAB failed: 0 <> "+str(x) end if x = DynapdfMBS.BOfLAB(lab) if x <> -90 then list.addrow "BOfLAB failed: -90 <> "+str(x) end if lab = DynapdfMBS.LAB(50,-127,0) /// green List.AddRow "LAB(50,-127,0): "+hex(lab) x = DynapdfMBS.LOfLAB(lab) if x <> 50 then list.addrow "LOfLAB failed: 50 <> "+str(x) end if x = DynapdfMBS.AOfLAB(lab) if x <> -127 then list.addrow "AOfLAB failed: -127 <> "+str(x) end if x = DynapdfMBS.BOfLAB(lab) if x <> 0 then list.addrow "BOfLAB failed: 0 <> "+str(x) end if lab = DynapdfMBS.LAB(100,100,100) List.AddRow "LAB(100,100,100): "+hex(lab) x = DynapdfMBS.LOfLAB(lab) if x <> 100 then list.addrow "LOfLAB failed: 100 <> "+str(x) end if x = DynapdfMBS.AOfLAB(lab) if x <> 100 then list.addrow "AOfLAB failed: 100 <> "+str(x) end if x = DynapdfMBS.BOfLAB(lab) if x <> 100 then list.addrow "BOfLAB failed: 100 <> "+str(x) end if lab = DynapdfMBS.LAB(100,-100,-100) List.AddRow "LAB(100,-100,-100): "+hex(lab) x = DynapdfMBS.LOfLAB(lab) if x <> 100 then list.addrow "LOfLAB failed: 100 <> "+str(x) end if x = DynapdfMBS.AOfLAB(lab) if x <> -100 then list.addrow "AOfLAB failed: -100 <> "+str(x) end if x = DynapdfMBS.BOfLAB(lab) if x <> -100 then list.addrow "BOfLAB failed: -100 <> "+str(x) end if // C 0 to 255, M 0 to 255, Y 0 to 255, K 0 to 255 dim cmyk as UInt32 = DynapdfMBS.CMYK(1,2,3,4) List.AddRow "CMYK(1,2,3,4): "+hex(cmyk) x = DynapdfMBS.CofCMYK(cmyk) if x <> 1 then list.addrow "CofCMYK failed: 1 <> "+str(x) end if x = DynapdfMBS.MofCMYK(cmyk) if x <> 2 then list.addrow "MofCMYK failed: 2 <> "+str(x) end if x = DynapdfMBS.YofCMYK(cmyk) if x <> 3 then list.addrow "YofCMYK failed: 3 <> "+str(x) end if x = DynapdfMBS.KofCMYK(cmyk) if x <> 4 then list.addrow "KofCMYK failed: 4 <> "+str(x) end if cmyk = DynapdfMBS.CMYK(200,220,240,255) List.AddRow "CMYK(200,220,240,255): "+hex(cmyk) x = DynapdfMBS.CofCMYK(cmyk) if x <> 200 then list.addrow "CofCMYK failed: 200 <> "+str(x) end if x = DynapdfMBS.MofCMYK(cmyk) if x <> 220 then list.addrow "MofCMYK failed: 220 <> "+str(x) end if x = DynapdfMBS.YofCMYK(cmyk) if x <> 240 then list.addrow "YofCMYK failed: 240 <> "+str(x) end if x = DynapdfMBS.KofCMYK(cmyk) if x <> 255 then list.addrow "KofCMYK failed: 255 <> "+str(x) end if list.addrow "Done" End EventHandler
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 DynaPDF Plugin.


The biggest plugin in space...