Class: Fox::FXDCWindow

Inherits:
FXDC
  • Object
show all
Defined in:
rdoc-sources/FXDCWindow.rb

Overview

A window device context allows drawing into an FXDrawable, such as an on-screen window (i.e. FXWindow and its derivatives) or an off-screen image (FXImage and its derivatives). Because certain hardware resources are locked down, only one FXDCWindow may be locked on a drawable at any one time.

Instance Attribute Summary

Attributes inherited from FXDC

#app, #background, #clipHeight, #clipRectangle, #clipRegion, #clipWidth, #clipX, #clipY, #dashLength, #dashOffset, #dashPattern, #fillRule, #fillStyle, #font, #foreground, #function, #lineCap, #lineJoin, #lineStyle, #lineWidth, #stipple, #tile

Instance Method Summary collapse

Methods inherited from FXDC

#clearClipMask, #clearClipRectangle, #clipChildren, #drawArc, #drawArcs, #drawArea, #drawBitmap, #drawCircle, #drawEllipse, #drawFocusRectangle, #drawHashBox, #drawIcon, #drawIconShaded, #drawIconSunken, #drawImage, #drawImageText, #drawLine, #drawLineSegments, #drawLines, #drawLinesRel, #drawPoint, #drawPoints, #drawPointsRel, #drawRectangle, #drawRectangles, #drawRoundRectangle, #drawText, #fillArc, #fillArcs, #fillChord, #fillChords, #fillCircle, #fillComplexPolygon, #fillComplexPolygonRel, #fillConcavePolygon, #fillConcavePolygonRel, #fillEllipse, #fillPolygon, #fillPolygonRel, #fillRectangle, #fillRectangles, #fillRoundRectangle, #readPixel, #setClipMask, #setClipRectangle, #setDashes

Constructor Details

#initialize(drawable, event = nil) ⇒ FXDCWindow

Construct a device context for drawing into a window (specified by drawable). If event is +nil_, the device context is constructed for normal drawing, and the clip rectangle is set to the whole rectange. If event is a reference to an FXEvent, the device context is constructed for painting in response to an expose; this sets the clip rectangle to the exposed rectangle. If an optional code block is provided, the new device context will be passed into the block as an argument and #end will be called automatically when the block terminates.


19
20
# File 'rdoc-sources/FXDCWindow.rb', line 19

def initialize(drawable, event=nil) # :yields: dc
end

Instance Method Details

#begin(drawable) ⇒ Object

Lock in a drawable surface.


25
# File 'rdoc-sources/FXDCWindow.rb', line 25

def begin(drawable) ; end

#endObject

Unlock the drawable surface.


30
# File 'rdoc-sources/FXDCWindow.rb', line 30

def end() ; end