ooodev.format.chart2.direct.general.area package
Module contents
- class ooodev.format.chart2.direct.general.area.Color(color=-1)[source]
Bases:
FillColor
Class for Chart Area Fill Color.
See also
New in version 0.9.4.
- class ooodev.format.chart2.direct.general.area.Gradient(chart_doc, *, style=GradientStyle.LINEAR, step_count=0, offset=Offset(x=50, y=50), angle=0, border=0, grad_color=ColorRange(start=0, end=16777215), grad_intensity=IntensityRange(start=100, end=100), name='')[source]
Bases:
Gradient
Style for Chart Area Fill Gradient.
See also
New in version 0.9.4.
- __init__(chart_doc, *, style=GradientStyle.LINEAR, step_count=0, offset=Offset(x=50, y=50), angle=0, border=0, grad_color=ColorRange(start=0, end=16777215), grad_intensity=IntensityRange(start=100, end=100), name='')[source]
Constructor
- Parameters:
chart_doc (XChartDocument) – Chart document.
style (GradientStyle, optional) – Specifies the style of the gradient. Defaults to
GradientStyle.LINEAR
.step_count (int, optional) – Specifies the number of steps of change color. Defaults to
0
.offset (Offset, int, optional) – Specifies the X and Y coordinate, where the gradient begins. X is effectively the center of the
RADIAL
,ELLIPTICAL
,SQUARE
andRECT
style gradients. Defaults toOffset(50, 50)
.angle (Angle, int, optional) – Specifies angle of the gradient. Defaults to
0
.border (int, optional) – Specifies percent of the total width where just the start color is used. Defaults to
0
.grad_color (ColorRange, optional) – Specifies the color at the start point and stop point of the gradient. Defaults to
ColorRange(Color(0), Color(16777215))
.grad_intensity (IntensityRange, optional) – Specifies the intensity at the start point and stop point of the gradient. Defaults to
IntensityRange(100, 100)
.name (str, optional) – Specifies the Fill Gradient Name.
- Return type:
None
See also
- copy()[source]
- copy(**kwargs)
- copy(**kwargs)
Copy the current instance.
- Returns:
The copied instance.
- Return type:
- classmethod from_obj(chart_doc, obj)[source]
- classmethod from_obj(chart_doc, obj, **kwargs)
- classmethod from_obj(chart_doc, obj, **kwargs)
Gets instance from object.
- Parameters:
chart_doc (XChartDocument) – Chart document.
obj (object) – UNO object.
- Raises:
NotSupportedError – If
obj
is not supported.- Returns:
Instance that represents Gradient color.
- Return type:
- classmethod from_preset(chart_doc, preset)[source]
- classmethod from_preset(chart_doc, preset, **kwargs)
- classmethod from_preset(chart_doc, preset, **kwargs)
Gets instance from preset.
- Parameters:
chart_doc (XChartDocument) – Chart document.
preset (PresetGradientKind) – Preset.
- Returns:
Gradient from a preset.
- Return type:
- classmethod from_struct(chart_doc, struct, name='', **kwargs)[source]
Gets instance from
GradientStruct
instance- Parameters:
chart_doc (XChartDocument) – Chart document.
struct (GradientStruct) – Gradient Struct instance.
name (str, optional) – Name of Gradient.
- Return type:
- default
Descriptor to raise an exception when an attribute is accessed after deletion.
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type:
- class ooodev.format.chart2.direct.general.area.Hatch(chart_doc, *, style=HatchStyle.SINGLE, color=0, space=0, angle=0, bg_color=-1)[source]
Bases:
StyleMulti
Class for Chart Area Fill Hatch.
See also
New in version 0.9.4.
- __init__(chart_doc, *, style=HatchStyle.SINGLE, color=0, space=0, angle=0, bg_color=-1)[source]
Constructor.
- Parameters:
chart_doc (XChartDocument) – Chart document.
style (HatchStyle, optional) – Specifies the kind of lines used to draw this hatch. Default
HatchStyle.SINGLE
.color (
Color
, optional) – Specifies the color of the hatch lines. Default0
.space (float, UnitT, optional) – Specifies the space between the lines in the hatch (in
mm
units) or Class UnitT. Default0.0
angle (Angle, int, optional) – Specifies angle of the hatch in degrees. Default to
0
.bg_color (Color, optional) – Specifies the background Color. Set this
-1
(default) for no background color.
- Return type:
None
See also
- copy()[source]
- copy(**kwargs)
- copy(**kwargs)
Copy the current instance.
- Returns:
The copied instance.
- Return type:
- classmethod from_preset(chart_doc, preset)[source]
- classmethod from_preset(chart_doc, preset, **kwargs)
- classmethod from_preset(chart_doc, preset, **kwargs)
Gets an instance from a preset.
- Parameters:
chart_doc (XChartDocument) – Chart document.
preset (PresetHatchKind) – Preset.
- Returns:
Instance from preset.
- Return type:
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type:
- property prop_hatch_name: str
Gets Hatch Name.
- Return type:
str
- property prop_style: HatchStyle
Gets/Sets the style.
- Return type:
HatchStyle
- class ooodev.format.chart2.direct.general.area.Img(chart_doc, *, bitmap=None, name='', mode=ImgStyleKind.TILED, size=None, position=None, pos_offset=None, tile_offset=None, auto_name=False)[source]
Bases:
Img
Class for Chart Area Fill Image.
See also
New in version 0.9.4.
- __init__(chart_doc, *, bitmap=None, name='', mode=ImgStyleKind.TILED, size=None, position=None, pos_offset=None, tile_offset=None, auto_name=False)[source]
Constructor
- Parameters:
chart_doc (XChartDocument) – Chart document.
bitmap (XBitmap, optional) – Bitmap instance. If
name
is not already in the Bitmap Table then this property is required.name (str, optional) – Specifies the name of the image. This is also the name that is used to store bitmap in LibreOffice Bitmap Table.
mode (ImgStyleKind, optional) – Specifies the image style, tiled, stretched etc. Default
ImgStyleKind.TILED
.size (SizePercent, SizeMM, optional) – Size in percent (
0 - 100
) or size inmm
units.position (RectanglePoint) – Tiling position of Image.
pos_offset (Offset, optional) – Tiling position offset.
tile_offset (OffsetColumn, OffsetRow, optional) – The tiling offset.
auto_name (bool, optional) – Specifies if
name
is ensured to be unique. Defaults toFalse
.
- Return type:
None
Note
If
auto_name
isFalse
then a bitmap for a givenname
is only required the first call. All subsequent call of the samename
will retrieve the bitmap form the LibreOffice Bitmap Table.See also
- copy()[source]
- copy(**kwargs)
- copy(**kwargs)
Gets a copy of instance as a new instance
- Return type:
- classmethod from_obj(chart_doc, obj)[source]
- classmethod from_obj(chart_doc, obj, **kwargs)
- classmethod from_obj(chart_doc, obj, **kwargs)
Gets instance from object
- Parameters:
chart_doc (XChartDocument) – Chart document.
obj (object) – UNO object.
- Raises:
NotSupportedError – If
obj
is not supported.- Returns:
Img
instance that representsobj
fill image.- Return type:
- classmethod from_preset(chart_doc, preset)[source]
- classmethod from_preset(chart_doc, preset, **kwargs)
- classmethod from_preset(chart_doc, preset, **kwargs)
Gets an instance from a preset.
- Parameters:
chart_doc (XChartDocument) – Chart document.
preset (PresetImageKind) – Preset.
- Returns:
Instance from preset.
- Return type:
- prop_bitmap
Descriptor to raise an exception when an attribute is accessed after deletion.
- class ooodev.format.chart2.direct.general.area.Pattern(chart_doc, *, bitmap=None, name='', tile=True, stretch=False, auto_name=False)[source]
Bases:
Pattern
Class for Chart Area Fill Pattern.
See also
New in version 0.9.4.
- __init__(chart_doc, *, bitmap=None, name='', tile=True, stretch=False, auto_name=False)[source]
Constructor
- Parameters:
chart_doc (XChartDocument) – Chart document.
bitmap (XBitmap, optional) – Bitmap instance. If
name
is not already in the Bitmap Table then this property is required.name (str, optional) – Specifies the name of the pattern. This is also the name that is used to store bitmap in LibreOffice Bitmap Table.
tile (bool, optional) – Specified if bitmap is tiled. Defaults to
True
.stretch (bool, optional) – Specifies if bitmap is stretched. Defaults to
False
.auto_name (bool, optional) – Specifies if
name
is ensured to be unique. Defaults toFalse
.
- Return type:
None
See also
- copy()[source]
- copy(**kwargs)
- copy(**kwargs)
Gets a copy of instance as a new instance
- Return type:
- classmethod from_obj(chart_doc, obj)[source]
- classmethod from_obj(chart_doc, obj, **kwargs)
- classmethod from_obj(chart_doc, obj, **kwargs)
Gets instance from object
- Parameters:
chart_doc (XChartDocument) – Chart document.
obj (object) – UNO object.
- Raises:
NotSupportedError – If
obj
is not supported.- Returns:
Pattern
instance that representsobj
fill pattern.- Return type:
- classmethod from_preset(chart_doc, preset)[source]
- classmethod from_preset(chart_doc, preset, **kwargs)
- classmethod from_preset(chart_doc, preset, **kwargs)
Gets an instance from a preset.
- Parameters:
preset (PresetPatternKind) – Preset.
chart_doc (XChartDocument) –
- Returns:
Pattern
instance from preset.- Return type:
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type:
- prop_stretch
Descriptor to raise an exception when an attribute is accessed after deletion.
- prop_tile
Descriptor to raise an exception when an attribute is accessed after deletion.