Exemplo n.º 1
0
 def BeginLayer(self, layer):
     if self.layers_as_groups:
         self.BeginGroup()
     else:
         write = self.file.write
         write('%AI5_BeginLayer\n')
         write('%d 1 %d %d 0 0 ' %
               (layer.Visible(), not layer.Locked(), layer.Printable()))
         color = layer.OutlineColor()
         write('-1 %d %d %d Lb\n' %
               (255 * color.red, 255 * color.green, 255 * color.blue))
         write('(%s) Ln\n' % quote_ps_string(layer.Name()))
     self.init_style()
Exemplo n.º 2
0
 def BeginLayer(self, layer):
     if self.layers_as_groups:
         self.BeginGroup()
     else:
         write = self.file.write
         write('%AI5_BeginLayer\n')
         write('%d 1 %d %d 0 0 ' % (layer.Visible(),
                                    not layer.Locked(),
                                    layer.Printable()))
         color = layer.OutlineColor()
         write('-1 %d %d %d Lb\n' % (255 * color.red, 255 * color.green,
                                     255 * color.blue))
         write('(%s) Ln\n' % quote_ps_string(layer.Name()))
     self.init_style()
Exemplo n.º 3
0
 def SimpleText(self, object):
     properties = object.Properties()
     style, gradient = self.write_properties(properties,
                                             object.bounding_rect)
     write = self.file.write
     write("0 To\n")  # point text
     trafo = object.FullTrafo()
     write("%g %g %g %g %g %g 0 Tp\n" % trafo.coeff())
     write("TP\n")
     write("0 Tr\n")  # fill text
     font = properties.font
     size = properties.font_size
     write("/_%s %g Tf\n" % (font.PostScriptName(), size))
     write("(%s) Tx\n" % quote_ps_string(object.Text()))
     write("TO\n")
Exemplo n.º 4
0
 def SimpleText(self, object):
     properties = object.Properties()
     style, gradient = self.write_properties(properties,
                                             object.bounding_rect)
     write = self.file.write
     write("0 To\n")         # point text
     trafo = object.FullTrafo()
     write("%g %g %g %g %g %g 0 Tp\n" % trafo.coeff())
     write("TP\n")
     write("0 Tr\n")         # fill text
     font = properties.font
     size = properties.font_size
     write("/_%s %g Tf\n" % (font.PostScriptName(), size))
     write("(%s) Tx\n" % quote_ps_string(object.Text()))
     write("TO\n")