ooodev.format.writer.modify.para.area package
Module contents
- class ooodev.format.writer.modify.para.area.Color(*, color=-1, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Bases:
ParaStyleBaseMultiParagraph Style Fill Coloring
See also
New in version 0.9.0.
- __init__(*, color=-1, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Constructor
- Parameters:
color (
Color, optional) – Fill Color.style_name (StyleParaKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.
style_family (str, optional) – Style family. Default
ParagraphStyles.
- Return type:
None
See also
- classmethod from_style(doc, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Gets instance from Document.
- Parameters:
doc (Any) – UNO Document Object.
style_name (StyleParaKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.
style_family (str, optional) – Style family. Default
ParagraphStyles.
- Returns:
Colorinstance from document properties.- Return type:
- property prop_style_name: str
Gets/Sets property Style Name
- Return type:
str
- class ooodev.format.writer.modify.para.area.Gradient(*, 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='', style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Bases:
ParaStyleBaseMultiParagraph Style Gradient Color
See also
New in version 0.9.0.
- __init__(*, 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='', style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Constructor
- Parameters:
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,SQUAREandRECTstyle 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.
style_name (StyleParaKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.
style_family (str, optional) – Style family. Default
ParagraphStyles.
- Return type:
None
See also
- static from_preset(preset, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Gets instance from preset
- Parameters:
preset (PresetGradientKind) – Preset
style_name (StyleParaKind | str) –
style_family (str) –
- Returns:
Gradient from a preset.
- Return type:
- classmethod from_style(doc, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Gets instance from Document.
- Parameters:
doc (Any) – UNO Document Object.
style_name (StyleParaKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.
style_family (str, optional) – Style family. Default
ParagraphStyles.
- Returns:
Alignmentinstance from document properties.- Return type:
- property prop_style_name: str
Gets/Sets property Style Name
- Return type:
str
- class ooodev.format.writer.modify.para.area.Hatch(*, style=HatchStyle.SINGLE, color=0, space=0.0, angle=0, bg_color=-1, name='', auto_name=False, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Bases:
ParaStyleBaseMultiParagraph Style Gradient Color
See also
New in version 0.9.0.
- __init__(*, style=HatchStyle.SINGLE, color=0, space=0.0, angle=0, bg_color=-1, name='', auto_name=False, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Constructor
- Parameters:
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
mmunits) or Class UnitT. Default0.0angle (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.name (str, optional) – Specifies the Hatch Name.
auto_name (bool, optional) – Specifies if Hatch is give an auto name such as
Hatch ``. Default ``False.style_name (StyleParaKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.
style_family (str, optional) – Style family. Default
ParagraphStyles.
- Return type:
None
See also
- static from_preset(preset, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Gets instance from preset
- Parameters:
preset (PresetHatchKind) – Preset
style_name (StyleParaKind | str) –
style_family (str) –
- Returns:
Hatch from a preset.
- Return type:
- classmethod from_style(doc, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Gets instance from Document.
- Parameters:
doc (Any) – UNO Document Object.
style_name (StyleParaKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.
style_family (str, optional) – Style family. Default
ParagraphStyles.
- Returns:
Alignmentinstance from document properties.- Return type:
- property prop_style_name: str
Gets/Sets property Style Name
- Return type:
str
- class ooodev.format.writer.modify.para.area.Img(*, bitmap=None, name='', mode=ImgStyleKind.TILED, size=None, position=None, pos_offset=None, tile_offset=None, auto_name=False, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Bases:
ParaStyleBaseMultiParagraph Style Fill Coloring
See also
New in version 0.9.0.
- __init__(*, bitmap=None, name='', mode=ImgStyleKind.TILED, size=None, position=None, pos_offset=None, tile_offset=None, auto_name=False, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Constructor
- Parameters:
color (
Color, optional) – FillColor Colorstyle_name (StyleParaKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.
style_family (str, optional) – Style family. Default
ParagraphStyles.bitmap (XBitmap | None) –
name (str) –
mode (ImgStyleKind) –
size (SizePercent | SizeMM | None) –
position (RectanglePoint | None) –
pos_offset (Offset | None) –
tile_offset (OffsetColumn | OffsetRow | None) –
auto_name (bool) –
- Return type:
None
See also
- classmethod from_preset(preset, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Gets an instance from a preset
- Parameters:
preset (PresetImageKind) – Preset
style_name (StyleParaKind | str) –
style_family (str) –
- Returns:
Instance from preset.
- Return type:
- classmethod from_style(doc, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Gets instance from Document.
- Parameters:
doc (Any) – UNO Document Object.
style_name (StyleParaKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.
style_family (str, optional) – Style family. Default
ParagraphStyles.
- Returns:
Imginstance from document properties.- Return type:
- property prop_style_name: str
Gets/Sets property Style Name
- Return type:
str
- class ooodev.format.writer.modify.para.area.Pattern(*, bitmap=None, name='', tile=True, stretch=False, auto_name=False, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Bases:
ParaStyleBaseMultiParagraph Style Gradient Color
See also
New in version 0.9.0.
- __init__(*, bitmap=None, name='', tile=True, stretch=False, auto_name=False, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Constructor
- Parameters:
bitmap (XBitmap, optional) – Bitmap instance. If
nameis 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
nameis ensured to be unique. Defaults toFalse.style_name (StyleParaKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.
style_family (str, optional) – Style family. Default
ParagraphStyles.
- Return type:
None
See also
- classmethod from_preset(preset, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Gets instance from preset
- Parameters:
preset (PresetPatternKind) – Preset
style_name (StyleParaKind | str) –
style_family (str) –
- Returns:
Hatch from a preset.
- Return type:
- classmethod from_style(doc, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]
Gets instance from Document.
- Parameters:
doc (Any) – UNO Document Object.
style_name (StyleParaKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.
style_family (str, optional) – Style family. Default
ParagraphStyles.
- Returns:
Alignmentinstance from document properties.- Return type:
- property prop_style_name: str
Gets/Sets property Style Name
- Return type:
str