Class: Clutter::Canvas
- Inherits:
-
Object
- Object
- Clutter::Canvas
- Defined in:
- (unknown)
Overview
The Clutter::CanvasClass structure contains private data.
Class Method Summary collapse
-
.new ⇒ Clutter::Content
Creates a new instance of Clutter::Canvas.
Instance Method Summary collapse
-
#height ⇒ Integer
The height of the canvas.
-
#height=(height) ⇒ Integer
The height of the canvas.
-
#scale_factor ⇒ Integer
The scaling factor to be applied to the Cairo surface used for drawing.
-
#scale_factor=(scale_factor) ⇒ Integer
The scaling factor to be applied to the Cairo surface used for drawing.
-
#scale_factor_set=(scale_factor_set) ⇒ Boolean
Whether the Clutter::Canvas:scale-factor property is set.
-
#scale_factor_set? ⇒ Boolean
Whether the Clutter::Canvas:scale-factor property is set.
-
#set_size(width, height) ⇒ Boolean
Sets the size of the canvas, and invalidates the content.
-
#width ⇒ Integer
The width of the canvas.
-
#width=(width) ⇒ Integer
The width of the canvas.
Class Method Details
.new ⇒ Clutter::Content
Creates a new instance of Clutter::Canvas.
You should call clutter_canvas_set_size() to set the size of the canvas.
You should call clutter_content_invalidate() every time you wish to draw the contents of the canvas.
Instance Method Details
#height ⇒ Integer
The height of the canvas.
#height=(height) ⇒ Integer
The height of the canvas.
#scale_factor ⇒ Integer
The scaling factor to be applied to the Cairo surface used for drawing.
If Clutter::Canvas:scale-factor is set to a negative value, the value of the Clutter::Settings:window-scaling-factor property is used instead.
Use Clutter::Canvas:scale-factor-set to check if the scale factor is set.
#scale_factor=(scale_factor) ⇒ Integer
The scaling factor to be applied to the Cairo surface used for drawing.
If Clutter::Canvas:scale-factor is set to a negative value, the value of the Clutter::Settings:window-scaling-factor property is used instead.
Use Clutter::Canvas:scale-factor-set to check if the scale factor is set.
#scale_factor_set=(scale_factor_set) ⇒ Boolean
Whether the Clutter::Canvas:scale-factor property is set.
If the Clutter::Canvas:scale-factor-set property is false then Clutter::Canvas will use the #ClutterSettings:window-scaling-factor property.
#scale_factor_set? ⇒ Boolean
Whether the Clutter::Canvas:scale-factor property is set.
If the Clutter::Canvas:scale-factor-set property is false then Clutter::Canvas will use the #ClutterSettings:window-scaling-factor property.
#set_size(width, height) ⇒ Boolean
Sets the size of the canvas, and invalidates the content.
This function will cause the canvas to be invalidated only if the size of the canvas surface has changed.
If you want to invalidate the contents of the canvas when setting the size, you can use the return value of the function to conditionally call clutter_content_invalidate():
|[ if (!clutter_canvas_set_size (canvas, width, height)) clutter_content_invalidate (CLUTTER_CONTENT (canvas)); ]|
#width ⇒ Integer
The width of the canvas.
#width=(width) ⇒ Integer
The width of the canvas.