Class: Fox::FXVisual

Inherits:
FXId show all
Defined in:
rdoc-sources/FXVisual.rb

Overview

An FXVisual instance describes the pixel format for a drawable (i.e. an FXDrawable instance).

Construction options for FXVisual

VISUAL_DEFAULT

Default visual

VISUAL_MONOCHROME

Must be monochrome visual

VISUAL_BEST

Best (deepest) visual

VISUAL_INDEXCOLOR

Palette visual

VISUAL_GRAYSCALE

Gray scale visual

VISUAL_TRUECOLOR

Must be true color visual

VISUAL_OWNCOLORMAP

Allocate private colormap

VISUAL_DOUBLEBUFFER

Double-buffered FXGLVisual

VISUAL_STEREO

Stereo FXGLVisual

VISUAL_NOACCEL

No hardware acceleration [for broken h/w]

VISUAL_SWAP_COPY

Buffer swap by copying (for FXGLVisual)

Visual type

VISUALTYPE_UNKNOWN

Undetermined visual type

VISUALTYPE_MONO

Visual for drawing into 1-bpp surfaces

VISUALTYPE_TRUE

True color

VISUALTYPE_INDEX

Index [palette] color

VISUALTYPE_GRAY

Gray scale

Direct Known Subclasses

FXGLVisual

Instance Attribute Summary (collapse)

Attributes inherited from FXId

#app, #userData, #xid

Instance Method Summary (collapse)

Methods inherited from FXId

#create, #created?, #destroy, #detach

Methods inherited from FXObject

#bind, #handle, #load, #save, subclasses

Constructor Details

- (FXVisual) initialize(a, flgs, d = 32)

Return an initialized FXVisual instance.

Parameters:

a

an application instance Fox::FXApp

flgs

visual construction flags [Integer]

d

requested visual depth, in bits [Integer]



66
# File 'rdoc-sources/FXVisual.rb', line 66

def initialize(a, flgs, d=32); end

Instance Attribute Details

- (Object) depth (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

- (Object) flags (readonly)

Visual construction flags [Integer]



29
30
31
# File 'rdoc-sources/FXVisual.rb', line 29

def flags
  @flags
end

- (Object) maxColors

Maximum number of colors [Integer]



47
48
49
# File 'rdoc-sources/FXVisual.rb', line 47

def maxColors
  @maxColors
end

- (Object) numBlue (readonly)

Number of bits of blue [Integer]



44
45
46
# File 'rdoc-sources/FXVisual.rb', line 44

def numBlue
  @numBlue
end

- (Object) numColors (readonly)

Number of colors [Integer]



35
36
37
# File 'rdoc-sources/FXVisual.rb', line 35

def numColors
  @numColors
end

- (Object) numGreen (readonly)

Number of bits of green [Integer]



41
42
43
# File 'rdoc-sources/FXVisual.rb', line 41

def numGreen
  @numGreen
end

- (Object) numRed (readonly)

Number of bits of red [Integer]



38
39
40
# File 'rdoc-sources/FXVisual.rb', line 38

def numRed
  @numRed
end

- (Object) visualType (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

- (Object) getColor(pix)

Get color value for device pixel value pix.



76
# File 'rdoc-sources/FXVisual.rb', line 76

def getColor(pix); end

- (Object) getPixel(clr)

Get device pixel value for color value clr.



71
# File 'rdoc-sources/FXVisual.rb', line 71

def getPixel(clr); end