Class: Fox::FXVisual
Overview
An FXVisual instance describes the pixel format for a drawable (i.e. an FXDrawable instance).
Construction options for FXVisual
VISUAL_DEFAULTDefault visual
VISUAL_MONOCHROMEMust be monochrome visual
VISUAL_BESTBest (deepest) visual
VISUAL_INDEXCOLORPalette visual
VISUAL_GRAYSCALEGray scale visual
VISUAL_TRUECOLORMust be true color visual
VISUAL_OWNCOLORMAPAllocate private colormap
VISUAL_DOUBLEBUFFERDouble-buffered FXGLVisual
VISUAL_STEREOStereo FXGLVisual
VISUAL_NOACCELNo hardware acceleration [for broken h/w]
VISUAL_SWAP_COPYBuffer swap by copying (for FXGLVisual)
Visual type
VISUALTYPE_UNKNOWNUndetermined visual type
VISUALTYPE_MONOVisual for drawing into 1-bpp surfaces
VISUALTYPE_TRUETrue color
VISUALTYPE_INDEXIndex [palette] color
VISUALTYPE_GRAYGray scale
Direct Known Subclasses
Instance Attribute Summary collapse
-
#depth ⇒ Object
readonly
Visual depth, i.e.
-
#flags ⇒ Object
readonly
Visual construction flags [Integer].
-
#maxColors ⇒ Object
Maximum number of colors [Integer].
-
#numBlue ⇒ Object
readonly
Number of bits of blue [Integer].
-
#numColors ⇒ Object
readonly
Number of colors [Integer].
-
#numGreen ⇒ Object
readonly
Number of bits of green [Integer].
-
#numRed ⇒ Object
readonly
Number of bits of red [Integer].
-
#visualType ⇒ Object
readonly
The visual type, one of
VISUALTYPE_MONO,VISUALTYPE_TRUEVISUALTYPE_INDEXorVISUALTYPE_GRAY.
Attributes inherited from FXId
Instance Method Summary collapse
-
#getColor(pix) ⇒ Object
Get color value for device pixel value pix.
-
#getPixel(clr) ⇒ Object
Get device pixel value for color value clr.
-
#initialize(a, flgs, d = 32) ⇒ FXVisual
constructor
Return an initialized FXVisual instance.
Methods inherited from FXId
#create, #created?, #destroy, #detach, #runOnUiThread
Methods inherited from FXObject
#bind, #handle, #load, #save, subclasses
Constructor Details
#initialize(a, flgs, d = 32) ⇒ FXVisual
Return an initialized FXVisual instance.
Parameters:
aan application instance Fox::FXApp
flgsvisual construction flags [Integer]
drequested visual depth, in bits [Integer]
66 |
# File 'rdoc-sources/FXVisual.rb', line 66 def initialize(a, flgs, d=32); end |
Instance Attribute Details
#depth ⇒ Object (readonly)
Visual depth, i.e. number of significant bits in color representation [Integer]
32 33 34 |
# File 'rdoc-sources/FXVisual.rb', line 32 def depth @depth end |
#flags ⇒ Object (readonly)
Visual construction flags [Integer]
29 30 31 |
# File 'rdoc-sources/FXVisual.rb', line 29 def flags @flags end |
#maxColors ⇒ Object
Maximum number of colors [Integer]
47 48 49 |
# File 'rdoc-sources/FXVisual.rb', line 47 def maxColors @maxColors end |
#numBlue ⇒ Object (readonly)
Number of bits of blue [Integer]
44 45 46 |
# File 'rdoc-sources/FXVisual.rb', line 44 def numBlue @numBlue end |
#numColors ⇒ Object (readonly)
Number of colors [Integer]
35 36 37 |
# File 'rdoc-sources/FXVisual.rb', line 35 def numColors @numColors end |
#numGreen ⇒ Object (readonly)
Number of bits of green [Integer]
41 42 43 |
# File 'rdoc-sources/FXVisual.rb', line 41 def numGreen @numGreen end |
#numRed ⇒ Object (readonly)
Number of bits of red [Integer]
38 39 40 |
# File 'rdoc-sources/FXVisual.rb', line 38 def numRed @numRed end |
#visualType ⇒ Object (readonly)
The visual type, one of VISUALTYPE_MONO, VISUALTYPE_TRUE
VISUALTYPE_INDEX or VISUALTYPE_GRAY. The visual type
may also be VISUALTYPE_UNKNOWN before the visual is actually
created.
55 56 57 |
# File 'rdoc-sources/FXVisual.rb', line 55 def visualType @visualType end |
Instance Method Details
#getColor(pix) ⇒ Object
Get color value for device pixel value pix.
76 |
# File 'rdoc-sources/FXVisual.rb', line 76 def getColor(pix); end |
#getPixel(clr) ⇒ Object
Get device pixel value for color value clr.
71 |
# File 'rdoc-sources/FXVisual.rb', line 71 def getPixel(clr); end |