📅  最后修改于: 2020-11-09 05:14:44             🧑  作者: Mango
通过将各种属性设置为所需值,可以自定义散景图的默认外观。这些属性主要是三种类型-
下表列出了与线字形相关的各种属性。
1 | line_color | color is used to stroke lines with |
2 | line_width | This is used in units of pixels as line stroke width |
3 | line_alpha | Between 0 (transparent) and 1 (opaque) this acts as a floating point |
4 | line_join | how to join together the path segments. Defined values are: ‘miter’ (miter_join), ’round’ (round_join), ‘bevel’ (bevel_join) |
5 | line_cap | how to terminate the path segments. Defined values are: ‘butt’ (butt_cap), ’round’ (round_cap), ‘square’ (square_cap) |
6 | line_dash | BThis is used for a line style. Defined values are: ‘solid’, ‘dashed’, ‘dotted’, ‘dotdash’, ‘dashdot’ |
7 | line_dash_offset | The distance into the line_dash in pixels that the pattern should start from |
下面列出了各种填充属性-
1 | fill_color | This is used to fill paths with |
2 | fill_alpha | Between 0 (transparent) and 1 (opaque), this acts as a floating point |
下表列出了许多与文本相关的属性-
1 | text_font | font name, e.g., ‘times’, ‘helvetica’ |
2 | text_font_size | font size in px, em, or pt, e.g., ’12pt’, ‘1.5em’ |
3 | text_font_style | font style to use ‘normal’ ‘italic’ ‘bold’ |
4 | text_color | This is used to render text with |
5 | text_alpha | Between 0 (transparent) and 1 (opaque), this is a floating point |
6 | text_align | horizontal anchor point for text – ‘left’, ‘right’, ‘center’ |
7 | text_baseline | vertical anchor point for text ‘top’, ‘middle’, ‘bottom’, ‘alphabetic’, ‘hanging’ |