GOffice.CanvasStyledItem¶
- Subclasses:
GOffice.CanvasArc
,GOffice.CanvasCircle
,GOffice.CanvasEllipse
,GOffice.CanvasLine
,GOffice.CanvasPath
,GOffice.CanvasPolygon
,GOffice.CanvasPolyline
,GOffice.CanvasRectangle
,GOffice.CanvasText
Methods¶
- Inherited:
GOffice.CanvasItem (22), GObject.Object (37), GOffice.StyledObject (8)
- Structs:
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Whether to scale the line width when zooming |
||
r/w |
A pointer to the |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
base |
r |
||
priv |
r |
||
scale_line_width |
r |
||
style |
r |
Class Details¶
- class GOffice.CanvasStyledItem(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
- get_scale_line_width()¶
- Returns:
whether the line width needs to be scaled.
- Return type:
This function returns
True
if the line width needs to be scaled. It will always returnFalse
if the line width is 0.
- set_cairo_line(cr)¶
- Parameters:
cr (
cairo.Context
) –cairo.Context
- Returns:
True
if the line is not invisible- Return type:
Prepares the cairo context cr to draw a line according to the item style and canvas scale. The line width is scaled only if the scale-line-width property is set to
True
. This function callsGOffice.StyledObject.set_cairo_line
().If the item drawing used goc_group_cairo_transform(), scale-line-width should be
False
to avoid scaling twice, orGOffice.StyledObject.set_cairo_line
() should be called directly instead.
- set_scale_line_width(scale_line_width)¶
- Parameters:
scale_line_width (
bool
) – boolean
Sets whether the line width needs to be scaled according to the current canvas resolution and the item transformation. It will be ignored if the line width is 0. Default
GOffice.value
isTrue
.
- do_init_style(style) virtual¶
- Parameters:
style (
GOffice.Style
) –
- do_style_changed(new_style) virtual¶
- Parameters:
new_style (
GOffice.Style
) –
Signal Details¶
- GOffice.CanvasStyledItem.signals.style_changed(canvas_styled_item, style)¶
- Signal Name:
style-changed
- Flags:
- Parameters:
canvas_styled_item (
GOffice.CanvasStyledItem
) – The object which received the signalstyle (
GObject.Object
) – the newGOffice.Style
.
The
::style-changed
signal is emitted when a new style has been set on a styled item.
Property Details¶
- GOffice.CanvasStyledItem.props.scale_line_width¶
-
Whether to scale the line width when zooming
- GOffice.CanvasStyledItem.props.style¶
- Name:
style
- Type:
- Default Value:
- Flags:
A pointer to the
GOffice.Style
object