本文整理汇总了Python中gramps.gen.plug.docgen.GraphicsStyle.set_line_style方法的典型用法代码示例。如果您正苦于以下问题:Python GraphicsStyle.set_line_style方法的具体用法?Python GraphicsStyle.set_line_style怎么用?Python GraphicsStyle.set_line_style使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gramps.gen.plug.docgen.GraphicsStyle
的用法示例。
在下文中一共展示了GraphicsStyle.set_line_style方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: make_default_style
# 需要导入模块: from gramps.gen.plug.docgen import GraphicsStyle [as 别名]
# 或者: from gramps.gen.plug.docgen.GraphicsStyle import set_line_style [as 别名]
def make_default_style(self,default_style):
"""Make the default output style for the Timeline report."""
# Paragraph Styles
f = FontStyle()
f.set_size(10)
f.set_type_face(FONT_SANS_SERIF)
p = ParagraphStyle()
p.set_font(f)
p.set_description(_("The style used for the person's name."))
default_style.add_paragraph_style("TLG-Name",p)
f = FontStyle()
f.set_size(8)
f.set_type_face(FONT_SANS_SERIF)
p = ParagraphStyle()
p.set_font(f)
p.set_alignment(PARA_ALIGN_CENTER)
p.set_description(_("The style used for the year labels."))
default_style.add_paragraph_style("TLG-Label",p)
f = FontStyle()
f.set_size(14)
f.set_type_face(FONT_SANS_SERIF)
p = ParagraphStyle()
p.set_font(f)
p.set_alignment(PARA_ALIGN_CENTER)
p.set_description(_("The style used for the title of the page."))
default_style.add_paragraph_style("TLG-Title",p)
"""
Graphic Styles
TLG-grid - 0.5pt wide line dashed line. Used for the lines that
make up the grid.
TLG-line - 0.5pt wide line. Used for the line connecting two
endpoints and for the birth marker.
TLG-solid - 0.5pt line with a black fill color. Used for the date of
death marker.
TLG-text - Contains the TLG-Name paragraph style used for the
individual's name.
TLG-title - Contains the TLG-Title paragraph style used for the
title of the document.
TLG-label - Contains the TLG-Label paragraph style used for the year
label's in the document.
"""
g = GraphicsStyle()
g.set_line_width(0.5)
g.set_color((0,0,0))
default_style.add_draw_style("TLG-line",g)
g = GraphicsStyle()
g.set_line_width(0.5)
g.set_color((0,0,0))
g.set_fill_color((0,0,0))
default_style.add_draw_style("TLG-solid",g)
g = GraphicsStyle()
g.set_line_width(0.5)
g.set_color((0,0,0))
g.set_fill_color((255,255,255))
default_style.add_draw_style("open",g)
g = GraphicsStyle()
g.set_line_width(0.5)
g.set_line_style(DASHED)
g.set_color((0,0,0))
default_style.add_draw_style("TLG-grid",g)
g = GraphicsStyle()
g.set_paragraph_style("TLG-Name")
g.set_color((0,0,0))
g.set_fill_color((255,255,255))
g.set_line_width(0)
default_style.add_draw_style("TLG-text",g)
g = GraphicsStyle()
g.set_paragraph_style("TLG-Title")
g.set_color((0,0,0))
g.set_fill_color((255,255,255))
g.set_line_width(0)
default_style.add_draw_style("TLG-title",g)
g = GraphicsStyle()
g.set_paragraph_style("TLG-Label")
g.set_color((0,0,0))
g.set_fill_color((255,255,255))
g.set_line_width(0)
default_style.add_draw_style("TLG-label",g)