Platforms to show: All Mac Windows Linux Cross-Platform

/MacCG/CoreGraphics DirectDisplay/Gamma Test


Required plugins for this example: MBS Util Plugin, MBS MacCG Plugin, MBS MacCF Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCG/CoreGraphics DirectDisplay/Gamma Test

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

Project "Gamma Test.xojo_binary_project"
Class Window1 Inherits Window
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control StaticText2 Inherits Label
ControlInstance StaticText2 Inherits Label
End Control
Control StaticText3 Inherits Label
ControlInstance StaticText3 Inherits Label
End Control
Control StaticText4 Inherits Label
ControlInstance StaticText4 Inherits Label
End Control
Control StaticText5 Inherits Label
ControlInstance StaticText5 Inherits Label
End Control
Control StaticText6 Inherits Label
ControlInstance StaticText6 Inherits Label
End Control
Control StaticText7 Inherits Label
ControlInstance StaticText7 Inherits Label
End Control
Control StaticText8 Inherits Label
ControlInstance StaticText8 Inherits Label
End Control
Control StaticText9 Inherits Label
ControlInstance StaticText9 Inherits Label
End Control
Control redmin Inherits Slider
ControlInstance redmin Inherits Slider
EventHandler Sub ValueChanged() dim e as integer if inited then form.RedMin=me.Value/100.0 e=display.SetDisplayTransferFormula(form) lasterror.text=str(e) end if End EventHandler
End Control
Control redmax Inherits Slider
ControlInstance redmax Inherits Slider
EventHandler Sub ValueChanged() dim e as integer if inited then form.RedMax=me.Value/100.0 e=display.SetDisplayTransferFormula(form) lasterror.text=str(e) end if End EventHandler
End Control
Control redgamma Inherits Slider
ControlInstance redgamma Inherits Slider
EventHandler Sub ValueChanged() dim e as integer if inited then form.RedGamma=me.Value/100.0 e=display.SetDisplayTransferFormula(form) lasterror.text=str(e) end if End EventHandler
End Control
Control greenmin Inherits Slider
ControlInstance greenmin Inherits Slider
EventHandler Sub ValueChanged() dim e as integer if inited then form.greenMin=me.Value/100.0 e=display.SetDisplayTransferFormula(form) lasterror.text=str(e) end if End EventHandler
End Control
Control greenmax Inherits Slider
ControlInstance greenmax Inherits Slider
EventHandler Sub ValueChanged() dim e as integer if inited then form.greenMax=me.Value/100.0 e=display.SetDisplayTransferFormula(form) lasterror.text=str(e) end if End EventHandler
End Control
Control greengamma Inherits Slider
ControlInstance greengamma Inherits Slider
EventHandler Sub ValueChanged() dim e as integer if inited then form.GreenGamma=me.Value/100.0 e=display.SetDisplayTransferFormula(form) lasterror.text=str(e) end if End EventHandler
End Control
Control bluemin Inherits Slider
ControlInstance bluemin Inherits Slider
EventHandler Sub ValueChanged() dim e as integer if inited then form.BlueMin=me.Value/100.0 e=display.SetDisplayTransferFormula(form) lasterror.text=str(e) end if End EventHandler
End Control
Control bluemax Inherits Slider
ControlInstance bluemax Inherits Slider
EventHandler Sub ValueChanged() dim e as integer if inited then form.BlueMax=me.Value/100.0 e=display.SetDisplayTransferFormula(form) lasterror.text=str(e) end if End EventHandler
End Control
Control bluegamma Inherits Slider
ControlInstance bluegamma Inherits Slider
EventHandler Sub ValueChanged() dim e as integer if inited then form.BlueGamma=me.Value/100.0 e=display.SetDisplayTransferFormula(form) lasterror.text=str(e) end if End EventHandler
End Control
Control StaticText10 Inherits Label
ControlInstance StaticText10 Inherits Label
EventHandler Sub Open() me.Text=Replace(me.text,"%",app.ApplicationNameMBS) End EventHandler
End Control
Control StaticText11 Inherits Label
ControlInstance StaticText11 Inherits Label
End Control
Control LastError Inherits Label
ControlInstance LastError Inherits Label
End Control
EventHandler Sub Open() dim e as integer dim f as CGDisplayTransferFormulaMBS display = CGDisplayMBS.MainDisplay e=display.GetDisplayTransferFormula(f) form=f LastError.text=str(e) RedMax.Value=f.RedMax*100 RedMin.Value=f.RedMin*100 RedGamma.Value=f.RedGamma*100 GreenMin.value=f.GreenMin*100 GreenMax.Value=f.GreenMax*100 GreenGamma.Value=f.GreenGamma*100 BlueGamma.Value=f.BlueGamma*100 BlueMax.Value=f.BlueMax*100 BlueMin.Value=f.BlueMin*100 inited=true End EventHandler
Property Protected display As CGDisplayMBS
Property Protected form As CGDisplayTransferFormulaMBS
Property Protected inited As boolean
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project

See also:

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


The biggest plugin in space...