Exemple #1
0
# the difference is in tarrw1.Paths()[0].arc_lengths() vs elpbz.Paths()[0].arc_lengths()
tarrw1.path = elpbz.Paths()[0] # and this FINALLY makes the arrow a circle!
tarrw2 = Arrow(arpath2, closed=1)

global tbase_style
tbase_style = Style()
tbase_style.fill_pattern = EmptyPattern
tbase_style.fill_transform = 1
tbase_style.line_pattern = SolidPattern(StandardColors.red)
tbase_style.line_width = 2.0
tbase_style.line_join = const.JoinMiter
tbase_style.line_cap = const.CapButt
tbase_style.line_dashes = ()
tbase_style.line_arrow1 = tarrw1
tbase_style.line_arrow2 = tarrw2
tbase_style.font = None
tbase_style.font_size = 12.0

# from create_spiral.py
from Sketch import CreatePath

# from footprints.py
from Sketch import Group

# additonal
# avoid font glyph problems on AsBezier
config.font_path.append('/var/lib/defoma/gs.d/dirs/fonts')
from Sketch import Graphics
from Sketch import Point, PolyBezier # to draw a line
from Sketch import Rectangle # box
from Sketch import CreateRGBColor # function
Exemple #2
0
from Sketch.warn import INTERNAL, warn_tb
from Sketch.load import GenericLoader, SketchLoadError
import Sketch.Graphics.font
from Sketch.Graphics import text

basestyle = Style()
basestyle.fill_pattern = EmptyPattern
basestyle.fill_transform = 1
basestyle.line_pattern = EmptyPattern
basestyle.line_width = 1.0
basestyle.line_join = const.JoinMiter
basestyle.line_cap = const.CapButt
basestyle.line_dashes = ()
basestyle.line_arrow1 = None
basestyle.line_arrow2 = None
basestyle.font = None
basestyle.font_size = 12.0

CGM_ID = {
    0x0020: 'BEGMF',
    0x0040: 'ENDMF',
    0x0060: 'BEGPIC',
    0x0080: 'BEGPICBODY',
    0x00A0: 'ENDPIC',
    0x1020: 'mfversion',
    0x1040: 'mfdesc',
    0x1060: 'vdctype',
    0x1080: 'integerprec',
    0x10a0: 'realprec',
    0x10c0: 'indexprec',
    0x10e0: 'colrprec',
Exemple #3
0
from Sketch.load import GenericLoader

from Sketch.Graphics import pagelayout, plugobj, blendgroup, text, image, eps,\
     properties

base_style = Style()
base_style.fill_pattern = EmptyPattern
base_style.fill_transform = 1
base_style.line_pattern = SolidPattern(StandardColors.black)
base_style.line_width = 0.0
base_style.line_join = const.JoinMiter
base_style.line_cap = const.CapButt
base_style.line_dashes = ()
base_style.line_arrow1 = None
base_style.line_arrow2 = None
base_style.font = None
base_style.font_size = 12.0

# sanity check: does base_style have all properties?
for key in dir(properties.factory_defaults):
    if not hasattr(base_style, key):
	warn(INTERNAL, 'added default for property %s', key)
	setattr(base_style, key,
                getattr(properties.factory_defaults, key))

papersizes = [#    'A0', 'A1', 'A2',
    'A3', 'A4', 'A5', 'A6', 'A7',
    'letter', 'legal', 'executive',
    ]

        
Exemple #4
0
from Sketch.warn import INTERNAL, warn_tb
from Sketch.load import GenericLoader, SketchLoadError
import Sketch.Graphics.font
from Sketch.Graphics import text

basestyle = Style()
basestyle.fill_pattern = EmptyPattern
basestyle.fill_transform = 1
basestyle.line_pattern = EmptyPattern
basestyle.line_width = 1.0
basestyle.line_join = const.JoinMiter
basestyle.line_cap = const.CapButt
basestyle.line_dashes = ()
basestyle.line_arrow1 = None
basestyle.line_arrow2 = None
basestyle.font = None
basestyle.font_size = 12.0


CGM_ID = {
    0x0020: 'BEGMF',
    0x0040: 'ENDMF',
    0x0060: 'BEGPIC',
    0x0080: 'BEGPICBODY',
    0x00A0: 'ENDPIC',
    0x1020: 'mfversion',
    0x1040: 'mfdesc',
    0x1060: 'vdctype',
    0x1080: 'integerprec',
    0x10a0: 'realprec',
    0x10c0: 'indexprec',