Struct spreadsheet_ods::draw::DrawFrame
source · pub struct DrawFrame { /* private fields */ }Expand description
The draw:frame element represents a frame and serves as the container for elements that may occur in a frame. Frame formatting properties are stored in styles belonging to the graphic family.
Implementations§
source§impl DrawFrame
impl DrawFrame
sourcepub fn attrmap_mut(&mut self) -> &mut AttrMap2
pub fn attrmap_mut(&mut self) -> &mut AttrMap2
Allows access to all attributes of the style itself.
sourcepub fn clear_desc(&mut self)
pub fn clear_desc(&mut self)
Desc
sourcepub fn clear_title(&mut self)
pub fn clear_title(&mut self)
Name
sourcepub fn set_content(&mut self, content: Vec<DrawFrameContent>)
pub fn set_content(&mut self, content: Vec<DrawFrameContent>)
Frame content.
sourcepub fn push_content(&mut self, content: DrawFrameContent)
pub fn push_content(&mut self, content: DrawFrameContent)
Frame content.
sourcepub fn clear_content(&mut self)
pub fn clear_content(&mut self)
Frame content.
sourcepub fn content_ref(&self) -> &Vec<DrawFrameContent>
pub fn content_ref(&self) -> &Vec<DrawFrameContent>
Frame content.
sourcepub fn content_mut(&mut self) -> &mut Vec<DrawFrameContent>
pub fn content_mut(&mut self) -> &mut Vec<DrawFrameContent>
Frame content.
sourcepub fn set_draw_name<S: Into<String>>(&mut self, id: S)
pub fn set_draw_name<S: Into<String>>(&mut self, id: S)
The draw:name attribute specifies a name by which a draw:frame element can be referenced.
sourcepub fn set_draw_caption_id<S: Into<String>>(&mut self, id: S)
pub fn set_draw_caption_id<S: Into<String>>(&mut self, id: S)
The draw:caption-id attribute establishes a relationship between a drawing shape and its caption. It takes a value of type IDREF. The value for the draw:caption-id attribute is the target ID assigned to the draw:text-box 10.4.3 element that contains the caption. Note: When a caption is assigned to a drawing shape, an id shall be assigned to the element containing the text used to caption a drawing shape. Removing the caption should result in removing the draw:caption-id attribute of the drawing shape that was being captioned
sourcepub fn set_draw_class_names(&mut self, names: &[GraphicStyleRef])
pub fn set_draw_class_names(&mut self, names: &[GraphicStyleRef])
The draw:class-names attribute specifies a white-space-separated list of styles with the family value of graphic. The referenced styles are applied in the order they are contained in the list. If both draw:style-name and draw:class-names are present, the style referenced by the draw:style-name attribute is applied before the styles referenced by the draw:class-names attribute.
sourcepub fn set_draw_corner_radius(&mut self, radius: u32)
pub fn set_draw_corner_radius(&mut self, radius: u32)
The draw:corner-radius attribute specifies the radius of the circle used to round off the corners of a caption draw:caption, rectangle draw:rect, or a text-box draw:textbox. The svg:rx 19.554 and svg:ry 19.555 attributes can also be used to round off the corners of a rectangle draw:rect.
If svg:rx and/or svg:ry and draw:corner-radius attributes are present on an element, the svg:rx and svg:ry attributes control the rounding applied to the shape defined by the element. If one or both of svg:rx and svg:ry attributes are present, any draw:corner-radius attribute is ignored.
sourcepub fn set_draw_copy_of<S: Into<String>>(&mut self, name: S)
pub fn set_draw_copy_of<S: Into<String>>(&mut self, name: S)
The draw:copy-of attribute specifies that a frame displays the contents of another frame. This does not effect style and position information. The style and position information of the frame with the draw:copy-of attribute is used to render the copied contents. Note: Multiple frames can be set to display the exact same underlying data: for instance for a company logo, that that is to appear somewhere on every page, without being part of a header or footer.
sourcepub fn set_draw_id<S: Into<String>>(&mut self, id: S)
pub fn set_draw_id<S: Into<String>>(&mut self, id: S)
The draw:id attribute specifies identifiers for draw elements. OpenDocument consumers shall ignore a draw:id attribute if it occurs on a draw element with an xml:id attribute value. OpenDocument producers may write draw:id attributes for any draw element in addition to an xml:id attribute. The value of a draw:id attribute shall equal the value of an xml:id attribute on the same element.
The draw:id attribute is deprecated in favor of xml:id
sourcepub fn set_draw_layer<S: Into<String>>(&mut self, layer: S)
pub fn set_draw_layer<S: Into<String>>(&mut self, layer: S)
The draw:layer attribute specifies the name of a layer in the layer-set of a document.
Note: The effect of this attribute is to assign a shape to a particular layer.
sourcepub fn set_draw_style_name(&mut self, style: GraphicStyleRef)
pub fn set_draw_style_name(&mut self, style: GraphicStyleRef)
The draw:style-name attribute specifies the name of a style:style element with a style:family attribute value value of graphic.
sourcepub fn set_draw_text_style_name(&mut self, style: ParagraphStyleRef)
pub fn set_draw_text_style_name(&mut self, style: ParagraphStyleRef)
The draw:text-style-name attribute specifies a style for formatting of text in a shape. The value of this attribute is the name of a style:style 16.2 element with a style:family 19.480 attribute value of paragraph.
sourcepub fn set_draw_transform<S: AsRef<str>>(&mut self, transform: &[S])
pub fn set_draw_transform<S: AsRef<str>>(&mut self, transform: &[S])
The draw:transform attribute specifies a list of transformations that can be applied to a drawing shape. The value of this attribute is a list of transform definitions, which are applied to the drawing shape in the order in which they are listed. The transform definitions in the list shall be separated by a white space and/or a comma “,” (U+002C, COMMA). Unless otherwise stated, the parameters of the transform definitions are double values (18.2)
The defined transforms are: • matrix(a b c d e f), specifies a transformation in the form of a transformation matrix of six values. “The values describe a standard 3x2 homogeneous transformation matrix in column-major order, where the right column (e, f) describes the translation. • rotate(rotate-angle), specifies a rotation by rotate-angle degrees about the origin of the shape’s coordinate system. • scale(sx [sy]), specifies a scale operation by sx and sy. If sy is not provided, it is assumed to be equal to sx. • skewX(skew-angle), specifies a skew transformation by skew-angle degrees along the x-axis. • skewY(skew-angle), specifies a skew transformation by skew-angle degrees along the y-axis. • translate(tx [ty]), specifies a translation by tx and ty, where tx and ty are lengths (18.3.18). If ty is not provided, it is assumed to be zero.
sourcepub fn set_draw_z_index(&mut self, z_index: u32)
pub fn set_draw_z_index(&mut self, z_index: u32)
The draw:z-index attribute defines a rendering order for shapes in a document instance. In the absence of this attribute, shapes are rendered in the order in which they appear in the document. The draw:z-index values increase from back to front.
For a shape on which the style:run-through 20.351 attribute with value foreground is in effect, producers should not generate a draw:z-index value that is smaller than the value of any draw:z-index on a shape on which the style:run-through attribute with value background is in effect.
Producers shall not generate a draw:z-index for shapes that are children of a draw:g element 10.3.15 or a dr3d:scene element 10.5.2.
sourcepub fn set_rel_height(&mut self, rel_height: RelativeScale)
pub fn set_rel_height(&mut self, rel_height: RelativeScale)
The style:rel-height attribute specifies height of a drawing object as a relative value within a frame. The defined values for the style:rel-height attribute are: • scale: the height should be calculated depending on the width, so that the ratio of width and height of the original image or object size is preserved. • scale-min: the height should be calculated as for value scale, but the calculated height is a minimum height rather than an absolute one. • a value of type percent 18.3.23. The interpretation of percentage values depends on the anchor of the drawing object. If the anchor for the drawing object is in a table cell, the percentage value is relative to the surrounding table box. If the anchor for the drawing object is in a text box, the percentage value is relative to the surrounding text box. In other cases, the percentage values is relative to the width of the page or window. To support consumers that do not support relative width and heights, producers should also provide the height in svg:height and fo:min-height attributes.
sourcepub fn set_rel_width(&mut self, rel_width: RelativeScale)
pub fn set_rel_width(&mut self, rel_width: RelativeScale)
The style:rel-width attribute specifies the relative width of a drawing object. The defined values for the style:rel-width attribute are:
- scale: the width should be calculated depending on the height, so that the ratio of width and height of the original image or object size is preserved.
- scale-min: the width should be calculated as for value scale, but the calculated width is a minimum width rather than an absolute one.
- a value of type percent 18.3.23. The interpretation of the percent value depends on the anchor of the drawing object. If the anchor for the drawing object is in a table cell, the percent value of the surrounding table box. If the anchor for the drawing object is in a text box, the percentage value of the surrounding text box. In all other cases, the percent value of the containing page or window To support consumers that do not support relative width, producers should also provide the width in a svg:width 19.575 attribute.
sourcepub fn set_height(&mut self, height: Length)
pub fn set_height(&mut self, height: Length)
Height.
sourcepub fn svg_x(&mut self, x: Length)
pub fn svg_x(&mut self, x: Length)
See §5.1.2 of SVG. For drawing shapes that have a non-rectangular shape, the coordinate refers to the drawing shape’s bounding box.
sourcepub fn svg_y(&mut self, y: Length)
pub fn svg_y(&mut self, y: Length)
See §5.1.2 of SVG. For drawing shapes that have a non-rectangular shape, the coordinate refers to the drawing shape’s bounding box.
sourcepub fn set_table_end_cell_address(&mut self, cellref: CellRef)
pub fn set_table_end_cell_address(&mut self, cellref: CellRef)
The table:end-cell-address attribute specifies the end position of the shape if it is included in a spreadsheet document.
sourcepub fn set_table_end_x(&mut self, x: Length)
pub fn set_table_end_x(&mut self, x: Length)
The table:end-x attribute specifies the x-coordinate of the end position of a shape relative to the top-left edge of a cell. The size attributes of the shape are ignored.
sourcepub fn set_table_end_y(&mut self, y: Length)
pub fn set_table_end_y(&mut self, y: Length)
The table:end-y attribute specifies the y-coordinate of the end position of a shape relative to the top-left edge of a cell. The size attributes of the shape are ignored.
sourcepub fn set_table_table_background(&mut self, is_bg: bool)
pub fn set_table_table_background(&mut self, is_bg: bool)
The table:table-background attribute specifies whether a shape is in the table background if the drawing shape is included in a spreadsheet document. The defined values for the table:table-background attribute are: • false: shape is included in foreground of a table. • true: shape is included in background of a table.
sourcepub fn set_xml_id<S: Into<String>>(&mut self, id: S)
pub fn set_xml_id<S: Into<String>>(&mut self, id: S)
The table:end-y attribute specifies the y-coordinate of the end position of a shape relative to the top-left edge of a cell. The size attributes of the shape are ignored.