GammaLib Xojo Plugin

Gamma Class

Gamma is a class to change the Gamma on the monitor.

Warning: If your application crashes for some reason before you reset your Gammas then you need to restore the System Gammas by re-calibrating your screen, or possibly zap your PRAM. The Gamma class will restore the Gamma settings for you when the class is terminated if you have not done so already.
Do not create more than one instance of the Gamma class unless you have some very special reason and that you are sure of what you are doing, again such incorrect usage might lead to need for zapping the PRAM to restore the system Gammas. On Win32 systems Gammas are restored in such situations by restarting the machine.

Note:
Gammas on Windows work a bit different than on MacOS, that is pure white on Windows does not change with the Gamma ramp. In general then Windows systems do not support setting hardware Gammas directly.

Most Windows systems now-days do not allow you to set System wide Gammas with those API's

Object
   Gamma

class Gamma

Properties

CanSetGammaUse this property to get information on if the current can set gamma or not.
DisplayCountReturns the number of displays or devices that can have their gamma set.
MainDisplayNumberReturns the number of the Main display device.
SuccessfulUse this property to get information on if Gamma change was successful.
ValueUse this property to set a new Gamma value.

Methods

GetDisplayGammaRampUse this function to get a Gamma Ramp for a specific display device.
RestoreUse this method to restore the Gammas that were the monitors active Gamma tables when the class was constructed.
SetDisplayGammaRampSets a GammaRamp for a specific display device.
SetDisplayGammaRampSets a GammaRamp and color for a specific display device.
SetDisplayGammaValueSets a Gamma value for a specific display device.

Supported Platforms:

  • macOS Cocoa 32 bit
  • macOS Cocoa 64 bit
  • macOS Apple Silicon
  • Unsupported Platforms:

  • Windows 32 bit
  • Windows 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM 32 bit