rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
EMR.SETMAPMODE.__init__(self,mode,last=TA_MASK) | _EMR._SETMAPMODE.__init__(self,mode,last=TA_MASK) | def __init__(self,mode=TA_BASELINE): EMR.SETMAPMODE.__init__(self,mode,last=TA_MASK) |
class SETTEXTCOLOR(EMR_UNKNOWN): | class _SETTEXTCOLOR(_EMR_UNKNOWN): | def __init__(self,mode=TA_BASELINE): EMR.SETMAPMODE.__init__(self,mode,last=TA_MASK) |
EMR_UNKNOWN.__init__(self) | _EMR_UNKNOWN.__init__(self) | def __init__(self,color=0): EMR_UNKNOWN.__init__(self) self.crColor=color |
class SETBKCOLOR(SETTEXTCOLOR): | class _SETBKCOLOR(_SETTEXTCOLOR): | def __init__(self,color=0): EMR_UNKNOWN.__init__(self) self.crColor=color |
class MOVETOEX(EMR_UNKNOWN): | class _MOVETOEX(_EMR_UNKNOWN): | def __init__(self,color=0): EMR_UNKNOWN.__init__(self) self.crColor=color |
EMR_UNKNOWN.__init__(self) | _EMR_UNKNOWN.__init__(self) | def __init__(self,x=0,y=0): EMR_UNKNOWN.__init__(self) self.ptl_x=x self.ptl_y=y |
class SCALEVIEWPORTEXTEX(EMR_UNKNOWN): | class _SCALEVIEWPORTEXTEX(_EMR_UNKNOWN): | def __init__(self,x=0,y=0): EMR_UNKNOWN.__init__(self) self.ptl_x=x self.ptl_y=y |
EMR_UNKNOWN.__init__(self) class SCALEWINDOWEXTEX(SCALEVIEWPORTEXTEX): | _EMR_UNKNOWN.__init__(self) class _SCALEWINDOWEXTEX(_SCALEVIEWPORTEXTEX): | def __init__(self): EMR_UNKNOWN.__init__(self) |
class SAVEDC(EMR_UNKNOWN): | class _SAVEDC(_EMR_UNKNOWN): | def __init__(self): EMR_UNKNOWN.__init__(self) |
class RESTOREDC(EMR_UNKNOWN): | class _RESTOREDC(_EMR_UNKNOWN): | def __init__(self): EMR_UNKNOWN.__init__(self) |
EMR_UNKNOWN.__init__(self) class SETWORLDTRANSFORM(EMR_UNKNOWN): | _EMR_UNKNOWN.__init__(self) class _SETWORLDTRANSFORM(_EMR_UNKNOWN): | def __init__(self): EMR_UNKNOWN.__init__(self) |
EMR_UNKNOWN.__init__(self) class MODIFYWORLDTRANSFORM(EMR_UNKNOWN): | _EMR_UNKNOWN.__init__(self) class _MODIFYWORLDTRANSFORM(_EMR_UNKNOWN): | def __init__(self): EMR_UNKNOWN.__init__(self) |
EMR_UNKNOWN.__init__(self) class SELECTOBJECT(EMR_UNKNOWN): | _EMR_UNKNOWN.__init__(self) class _SELECTOBJECT(_EMR_UNKNOWN): | def __init__(self): EMR_UNKNOWN.__init__(self) |
EMR_UNKNOWN.__init__(self) | _EMR_UNKNOWN.__init__(self) | def __init__(self,dc=None,handle=0): EMR_UNKNOWN.__init__(self) self.handle=handle |
class CREATEPEN(EMR_UNKNOWN): | class _CREATEPEN(_EMR_UNKNOWN): | def __init__(self,dc=None,handle=0): EMR_UNKNOWN.__init__(self) self.handle=handle |
EMR_UNKNOWN.__init__(self) | _EMR_UNKNOWN.__init__(self) | def __init__(self,style=PS_SOLID,width=1,color=0): EMR_UNKNOWN.__init__(self) self.lopn_style=style self.lopn_width=width self.lopn_color=color |
class CREATEBRUSHINDIRECT(EMR_UNKNOWN): | class _CREATEBRUSHINDIRECT(_EMR_UNKNOWN): | def __init__(self,style=PS_SOLID,width=1,color=0): EMR_UNKNOWN.__init__(self) self.lopn_style=style self.lopn_width=width self.lopn_color=color |
EMR_UNKNOWN.__init__(self) | _EMR_UNKNOWN.__init__(self) | def __init__(self,style=BS_SOLID,hatch=HS_HORIZONTAL,color=0): EMR_UNKNOWN.__init__(self) self.lbStyle = style self.lbColor = color self.lbHatch = hatch |
class DELETEOBJECT(SELECTOBJECT): | class _DELETEOBJECT(_SELECTOBJECT): | def __init__(self,style=BS_SOLID,hatch=HS_HORIZONTAL,color=0): EMR_UNKNOWN.__init__(self) self.lbStyle = style self.lbColor = color self.lbHatch = hatch |
class ANGLEARC(EMR_UNKNOWN): | class _ANGLEARC(_EMR_UNKNOWN): | def __init__(self,style=BS_SOLID,hatch=HS_HORIZONTAL,color=0): EMR_UNKNOWN.__init__(self) self.lbStyle = style self.lbColor = color self.lbHatch = hatch |
EMR_UNKNOWN.__init__(self) class ELLIPSE(EMR_UNKNOWN): | _EMR_UNKNOWN.__init__(self) class _ELLIPSE(_EMR_UNKNOWN): | def __init__(self): EMR_UNKNOWN.__init__(self) |
EMR_UNKNOWN.__init__(self) | _EMR_UNKNOWN.__init__(self) | def __init__(self,box=(0,0,0,0)): EMR_UNKNOWN.__init__(self) self.rclBox_left=box[0] self.rclBox_top=box[1] self.rclBox_right=box[2] self.rclBox_bottom=box[3] |
class RECTANGLE(ELLIPSE): | class _RECTANGLE(_ELLIPSE): | def __init__(self,box=(0,0,0,0)): EMR_UNKNOWN.__init__(self) self.rclBox_left=box[0] self.rclBox_top=box[1] self.rclBox_right=box[2] self.rclBox_bottom=box[3] |
class ROUNDRECT(EMR_UNKNOWN): | class _ROUNDRECT(_EMR_UNKNOWN): | def __init__(self,box=(0,0,0,0)): EMR_UNKNOWN.__init__(self) self.rclBox_left=box[0] self.rclBox_top=box[1] self.rclBox_right=box[2] self.rclBox_bottom=box[3] |
EMR_UNKNOWN.__init__(self) | _EMR_UNKNOWN.__init__(self) | def __init__(self,box=(0,0,0,0),cx=0,cy=0): EMR_UNKNOWN.__init__(self) self.rclBox_left=box[0] self.rclBox_top=box[1] self.rclBox_right=box[2] self.rclBox_bottom=box[3] self.szlCorner_cx=cx self.szlCorner_cy=cy |
class ARC(EMR_UNKNOWN): | class _ARC(_EMR_UNKNOWN): | def __init__(self,box=(0,0,0,0),cx=0,cy=0): EMR_UNKNOWN.__init__(self) self.rclBox_left=box[0] self.rclBox_top=box[1] self.rclBox_right=box[2] self.rclBox_bottom=box[3] self.szlCorner_cx=cx self.szlCorner_cy=cy |
EMR_UNKNOWN.__init__(self) | _EMR_UNKNOWN.__init__(self) | def __init__(self,left=0,top=0,right=0,bottom=0, xstart=0,ystart=0,xend=0,yend=0): EMR_UNKNOWN.__init__(self) self.rclBox_left=left self.rclBox_top=top self.rclBox_right=right self.rclBox_bottom=bottom self.ptlStart_x=xstart self.ptlStart_y=ystart self.ptlEnd_x=xend self.ptlEnd_y=yend |
class CHORD(ARC): | class _CHORD(_ARC): | def __init__(self,left=0,top=0,right=0,bottom=0, xstart=0,ystart=0,xend=0,yend=0): EMR_UNKNOWN.__init__(self) self.rclBox_left=left self.rclBox_top=top self.rclBox_right=right self.rclBox_bottom=bottom self.ptlStart_x=xstart self.ptlStart_y=ystart self.ptlEnd_x=xend self.ptlEnd_y=yend |
class PIE(ARC): | class _PIE(_ARC): | def __init__(self,left=0,top=0,right=0,bottom=0, xstart=0,ystart=0,xend=0,yend=0): EMR_UNKNOWN.__init__(self) self.rclBox_left=left self.rclBox_top=top self.rclBox_right=right self.rclBox_bottom=bottom self.ptlStart_x=xstart self.ptlStart_y=ystart self.ptlEnd_x=xend self.ptlEnd_y=yend |
class SELECTPALLETE(EMR_UNKNOWN): | class _SELECTPALLETE(_EMR_UNKNOWN): | def __init__(self,left=0,top=0,right=0,bottom=0, xstart=0,ystart=0,xend=0,yend=0): EMR_UNKNOWN.__init__(self) self.rclBox_left=left self.rclBox_top=top self.rclBox_right=right self.rclBox_bottom=bottom self.ptlStart_x=xstart self.ptlStart_y=ystart self.ptlEnd_x=xend self.ptlEnd_y=yend |
class LINETO(MOVETOEX): | class _LINETO(_MOVETOEX): | def __init__(self): EMR_UNKNOWN.__init__(self) |
class ARCTO(ARC): | class _ARCTO(_ARC): | def __init__(self): EMR_UNKNOWN.__init__(self) |
class SETARCDIRECTION(EMR_UNKNOWN): | class _SETARCDIRECTION(_EMR_UNKNOWN): | def __init__(self): EMR_UNKNOWN.__init__(self) |
class BEGINPATH(EMR_UNKNOWN): | class _BEGINPATH(_EMR_UNKNOWN): | def __init__(self): EMR_UNKNOWN.__init__(self) |
class ENDPATH(EMR_UNKNOWN): | class _ENDPATH(_EMR_UNKNOWN): | def __init__(self): EMR_UNKNOWN.__init__(self) |
class CLOSEFIGURE(EMR_UNKNOWN): | class _CLOSEFIGURE(_EMR_UNKNOWN): | def __init__(self): EMR_UNKNOWN.__init__(self) |
class FILLPATH(EMR_UNKNOWN): | class _FILLPATH(_EMR_UNKNOWN): | def __init__(self): EMR_UNKNOWN.__init__(self) |
EMR_UNKNOWN.__init__(self) | _EMR_UNKNOWN.__init__(self) | def __init__(self,bounds=(0,0,0,0)): EMR_UNKNOWN.__init__(self) self.setBounds(bounds) |
class STROKEANDFILLPATH(FILLPATH): | class _STROKEANDFILLPATH(_FILLPATH): | def __init__(self,bounds=(0,0,0,0)): EMR_UNKNOWN.__init__(self) self.setBounds(bounds) |
class STROKEPATH(FILLPATH): | class _STROKEPATH(_FILLPATH): | def __init__(self,bounds=(0,0,0,0)): EMR_UNKNOWN.__init__(self) self.setBounds(bounds) |
class FLATTENPATH(EMR_UNKNOWN): | class _FLATTENPATH(_EMR_UNKNOWN): | def __init__(self,bounds=(0,0,0,0)): EMR_UNKNOWN.__init__(self) self.setBounds(bounds) |
class WIDENPATH(EMR_UNKNOWN): | class _WIDENPATH(_EMR_UNKNOWN): | def __init__(self,bounds=(0,0,0,0)): EMR_UNKNOWN.__init__(self) self.setBounds(bounds) |
class ABORTPATH(EMR_UNKNOWN): | class _ABORTPATH(_EMR_UNKNOWN): | def __init__(self,bounds=(0,0,0,0)): EMR_UNKNOWN.__init__(self) self.setBounds(bounds) |
class EXTCREATEFONTINDIRECTW(EMR_UNKNOWN): | class _EXTCREATEFONTINDIRECTW(_EMR_UNKNOWN): | def __init__(self,bounds=(0,0,0,0)): EMR_UNKNOWN.__init__(self) self.setBounds(bounds) |
EMR_UNKNOWN.__init__(self) | _EMR_UNKNOWN.__init__(self) | def __init__(self,height=0,width=0,escapement=0,orientation=0, weight=FW_NORMAL,italic=0,underline=0,strike_out=0, charset=ANSI_CHARSET,out_precision=OUT_DEFAULT_PRECIS, clip_precision=CLIP_DEFAULT_PRECIS, quality=DEFAULT_QUALITY, pitch_family=DEFAULT_PITCH|FF_DONTCARE,name='Times New Roman'): EMR_UNKNOWN.__init__(self... |
self.unhandleddata=EMR_UNKNOWN.twobytepadding | self.unhandleddata=_EMR_UNKNOWN.twobytepadding | def __init__(self,height=0,width=0,escapement=0,orientation=0, weight=FW_NORMAL,italic=0,underline=0,strike_out=0, charset=ANSI_CHARSET,out_precision=OUT_DEFAULT_PRECIS, clip_precision=CLIP_DEFAULT_PRECIS, quality=DEFAULT_QUALITY, pitch_family=DEFAULT_PITCH|FF_DONTCARE,name='Times New Roman'): EMR_UNKNOWN.__init__(self... |
print "lfFaceName=%s" % self.lfFaceName class EXTTEXTOUTA(EMR_UNKNOWN): | class _EXTTEXTOUTA(_EMR_UNKNOWN): | def __init__(self,height=0,width=0,escapement=0,orientation=0, weight=FW_NORMAL,italic=0,underline=0,strike_out=0, charset=ANSI_CHARSET,out_precision=OUT_DEFAULT_PRECIS, clip_precision=CLIP_DEFAULT_PRECIS, quality=DEFAULT_QUALITY, pitch_family=DEFAULT_PITCH|FF_DONTCARE,name='Times New Roman'): EMR_UNKNOWN.__init__(self... |
EMR_UNKNOWN.__init__(self) | _EMR_UNKNOWN.__init__(self) | def __init__(self,x=0,y=0,txt=""): EMR_UNKNOWN.__init__(self) self.ptlReference_x=x self.ptlReference_y=y if isinstance(txt,unicode): self.string=txt.encode('utf-16')[2:] else: self.string=txt self.charsize=1 self.dx=[] |
sizestring=round4(self.charsize*self.nChars) | sizestring=_round4(self.charsize*self.nChars) | def sizeExtra(self): offset=self.serializeOffset() sizedx=0 sizestring=0 |
class EXTTEXTOUTW(EXTTEXTOUTA): | class _EXTTEXTOUTW(_EXTTEXTOUTA): | def str_extra(self): txt=StringIO() txt.write("\tdx: %s\n" % str(self.dx)) if self.charsize==2: txt.write("\tunicode string: %s\n" % str(self.string.decode('utf-16'))) else: txt.write("\tascii string: %s\n" % str(self.string)) return txt.getvalue() |
EMR.EXTTEXTOUTA.__init__(self,x,y,txt) | _EMR._EXTTEXTOUTA.__init__(self,x,y,txt) | def __init__(self,x=0,y=0,txt=u''): EMR.EXTTEXTOUTA.__init__(self,x,y,txt) self.charsize=2 |
class POLYBEZIER16(EMR_UNKNOWN): | class _POLYBEZIER16(_EMR_UNKNOWN): | def __init__(self,x=0,y=0,txt=u''): EMR.EXTTEXTOUTA.__init__(self,x,y,txt) self.charsize=2 |
EMR_UNKNOWN.__init__(self) | _EMR_UNKNOWN.__init__(self) | def __init__(self,points=[],bounds=(0,0,0,0)): EMR_UNKNOWN.__init__(self) self.setBounds(bounds) self.cpts=len(points) self.apts=points |
class POLYGON16(POLYBEZIER16): | class _POLYGON16(_POLYBEZIER16): | def str_extra(self): txt=StringIO() start=0 txt.write("\tpoints: %s\n" % str(self.apts)) return txt.getvalue() |
class POLYLINE16(POLYBEZIER16): | class _POLYLINE16(_POLYBEZIER16): | def str_extra(self): txt=StringIO() start=0 txt.write("\tpoints: %s\n" % str(self.apts)) return txt.getvalue() |
class POLYBEZIERTO16(POLYBEZIER16): | class _POLYBEZIERTO16(_POLYBEZIER16): | def str_extra(self): txt=StringIO() start=0 txt.write("\tpoints: %s\n" % str(self.apts)) return txt.getvalue() |
class POLYLINETO16(POLYBEZIER16): | class _POLYLINETO16(_POLYBEZIER16): | def str_extra(self): txt=StringIO() start=0 txt.write("\tpoints: %s\n" % str(self.apts)) return txt.getvalue() |
class POLYPOLYLINE16(EMR_UNKNOWN): | class _POLYPOLYLINE16(_EMR_UNKNOWN): | def str_extra(self): txt=StringIO() start=0 txt.write("\tpoints: %s\n" % str(self.apts)) return txt.getvalue() |
class POLYPOLYGON16(POLYPOLYLINE16): | class _POLYPOLYGON16(_POLYPOLYLINE16): | def str_extra(self): txt=StringIO() start=0 for n in range(self.nPolys): txt.write("\tPolygon %d: %d points\n" % (n,self.aPolyCounts[n])) txt.write("\t\t%s\n" % str(self.apts[start:start+self.aPolyCounts[n]])) start+=self.aPolyCounts[n] return txt.getvalue() |
for name in dir(EMR): | for name in dir(_EMR): | def str_extra(self): txt=StringIO() start=0 for n in range(self.nPolys): txt.write("\tPolygon %d: %d points\n" % (n,self.aPolyCounts[n])) txt.write("\t\t%s\n" % str(self.apts[start:start+self.aPolyCounts[n]])) start+=self.aPolyCounts[n] return txt.getvalue() |
cls=getattr(EMR,name,None) if cls and callable(cls) and issubclass(cls,EMR_UNKNOWN): | cls=getattr(_EMR,name,None) if cls and callable(cls) and issubclass(cls,_EMR_UNKNOWN): | def str_extra(self): txt=StringIO() start=0 for n in range(self.nPolys): txt.write("\tPolygon %d: %d points\n" % (n,self.aPolyCounts[n])) txt.write("\t\t%s\n" % str(self.apts[start:start+self.aPolyCounts[n]])) start+=self.aPolyCounts[n] return txt.getvalue() |
@group Creating Metafiles: Create, Save @group Drawing Parameters: RGB, GetStockObject, SelectObject, DeleteObject, Crea tePen, CreateSolidBrush, SetBkColor, SetBkMode, SetPolyFillMode | @group Creating Metafiles: __init__, load, save @group Drawing Parameters: GetStockObject, SelectObject, DeleteObject, CreatePen, CreateSolidBrush, CreateHatchBrush, SetBkColor, SetBkMode, SetPolyFillMode | def str_extra(self): txt=StringIO() start=0 for n in range(self.nPolys): txt.write("\tPolygon %d: %d points\n" % (n,self.aPolyCounts[n])) txt.write("\t\t%s\n" % str(self.apts[start:start+self.aPolyCounts[n]])) start+=self.aPolyCounts[n] return txt.getvalue() |
PolyBezierTo, CloseFigure, FillPath, StrokePath | PolyBezierTo, CloseFigure, FillPath, StrokePath, StrokeAndFillPath | def str_extra(self): txt=StringIO() start=0 for n in range(self.nPolys): txt.write("\tPolygon %d: %d points\n" % (n,self.aPolyCounts[n])) txt.write("\t\t%s\n" % str(self.apts[start:start+self.aPolyCounts[n]])) start+=self.aPolyCounts[n] return txt.getvalue() |
self.dc=DC(width,height,density,units) | self.dc=_DC(width,height,density,units) | def __init__(self,width=6.0,height=4.0,density=300,units="in", description="pyemf.sf.net",verbose=False): """ |
emr=EMR.HEADER(description) | emr=_EMR._HEADER(description) | def __init__(self,width=6.0,height=4.0,density=300,units="in", description="pyemf.sf.net",verbose=False): """ |
e=EMR_UNKNOWN() | e=_EMR_UNKNOWN() | def _unserialize(self,fh): try: count=1 while count>0: data=fh.read(8) count=len(data) if count>0: (iType,nSize)=struct.unpack("<ii",data) if self.verbose: print "EMF: iType=%d nSize=%d" % (iType,nSize) |
if not isinstance(end,EMR.EOF): | if not isinstance(end,_EMR._EOF): | def _end(self): end=self.records[-1] if not isinstance(end,EMR.EOF): if self.verbose: print "adding EOF record" e=EMR.EOF() self._append(e) header=self.records[0] header.setBounds(self.dc) header.nRecords=len(self.records) header.nHandles=len(self.dc.objects) size=0 for e in self.records: e.resize() size+=e.nSize heade... |
e=EMR.EOF() | e=_EMR._EOF() | def _end(self): end=self.records[-1] if not isinstance(end,EMR.EOF): if self.verbose: print "adding EOF record" e=EMR.EOF() self._append(e) header=self.records[0] header.setBounds(self.dc) header.nRecords=len(self.records) header.nHandles=len(self.dc.objects) size=0 for e in self.records: e.resize() size+=e.nSize heade... |
return self._append(EMR.SELECTOBJECT(self.dc,handle)) | return self._append(_EMR._SELECTOBJECT(self.dc,handle)) | def SelectObject(self,handle): """ |
return self._appendHandle(EMR.CREATEPEN(style,width,normalizeColor(color))) | return self._appendHandle(_EMR._CREATEPEN(style,width,_normalizeColor(color))) | def CreatePen(self,style,width,color): """ |
return self._appendHandle(EMR.CREATEBRUSHINDIRECT(color=normalizeColor(color))) | return self._appendHandle(_EMR._CREATEBRUSHINDIRECT(color=_normalizeColor(color))) | def CreateSolidBrush(self,color): """ |
return self._appendHandle(EMR.CREATEBRUSHINDIRECT(hatch=hatch,color=normalizeColor(color))) | return self._appendHandle(_EMR._CREATEBRUSHINDIRECT(hatch=hatch,color=_normalizeColor(color))) | def CreateHatchBrush(self,hatch,color): """ |
e=EMR.SETBKCOLOR(normalizeColor(color)) | e=_EMR._SETBKCOLOR(_normalizeColor(color)) | def SetBkColor(self,color): """ |
e=EMR.SETBKMODE(mode) | e=_EMR._SETBKMODE(mode) | def SetBkMode(self,mode): """ |
e=EMR.SETPOLYFILLMODE(mode) | e=_EMR._SETPOLYFILLMODE(mode) | def SetPolyFillMode(self,mode): """ |
def GetDeviceCaps(self,capability): | def GetDeviceCaps(self): | def GetDeviceCaps(self,capability): """ |
@param capability: enumeration with the following options: - DRIVERVERSION - TECHNOLOGY - HORZSIZE - VERTSIZE - HORZRES - VERTRES - LOGPIXELSX - LOGPIXELSY @return: device capability @rtype: int @type capability: int | @return: Capability dictionary; note that to conform with ECMA documentation, the key names are in upper case: - B{DRIVERVERSION} - Device driver version number. Value is always 1. - B{TECHNOLOGY} - Device technology available. Always returns DT_METAFILE - B{HORZSIZE} - Horizontal size of reference device in millimet... | def GetDeviceCaps(self,capability): """ |
e=EMR.SETMAPMODE(mode) | e=_EMR._SETMAPMODE(mode) | def SetMapMode(self,mode): """ |
e=EMR.SETVIEWPORTORGEX(cx,cy) | e=_EMR._SETVIEWPORTORGEX(cx,cy) | def SetViewportOrgEx(self,x,y): """ |
e=EMR.SETVIEWPORTEXTEX(cx,cy) | e=_EMR._SETVIEWPORTEXTEX(cx,cy) | def SetViewportExtEx(self,cx,cy): """ |
e=EMR.SETWINDOWEXTEX(cx,cy) | e=_EMR._SETWINDOWEXTEX(cx,cy) | def SetWindowExtEx(self,cx,cy): """ |
return self._append(EMR.SETPIXELV(x,y,normalizeColor(color))) | return self._append(_EMR._SETPIXELV(x,y,_normalizeColor(color))) | def SetPixel(self,x,y,color): """ |
return self._appendOptimize16(points,EMR.POLYLINE16,EMR.POLYLINE) | return self._appendOptimize16(points,_EMR._POLYLINE16,_EMR._POLYLINE) | def Polyline(self,points): """ |
print "converting to rectangle, option 1:" return self.Rectangle(self.dc,points[0][0],points[0][1],points[2][0],points[2][1]) | if self.verbose: print "converting to rectangle, option 1:" return self.Rectangle(points[0][0],points[0][1],points[2][0],points[2][1]) | def Polygon(self,points): """ |
print "converting to rectangle, option 2:" return self.Rectangle(self.dc,points[0][0],points[0][1],points[2][0],points[2][1]) return self._appendOptimize16(points,EMR.POLYGON16,EMR.POLYGON) | if self.verbose: print "converting to rectangle, option 2:" return self.Rectangle(points[0][0],points[0][1],points[2][0],points[2][1]) return self._appendOptimize16(points,_EMR._POLYGON16,_EMR._POLYGON) | def Polygon(self,points): """ |
return self._append(EMR.ELLIPSE((left,top,right,bottom))) | return self._append(_EMR._ELLIPSE((left,top,right,bottom))) | def Ellipse(self,left,top,right,bottom): """ |
return self._append(EMR.RECTANGLE((left,top,right,bottom))) | return self._append(_EMR._RECTANGLE((left,top,right,bottom))) | def Rectangle(self,left,top,right,bottom): """ |
return self._append(EMR.ROUNDRECT((left,top,right,bottom, | return self._append(_EMR._ROUNDRECT((left,top,right,bottom, | def RoundRect(self,left,top,right,bottom,cornerwidth,cornerheight): """ |
return self._append(EMR.ARC(left,top,right,bottom, | return self._append(_EMR._ARC(left,top,right,bottom, | def Arc(self,left,top,right,bottom,xstart,ystart,xend,yend): """ |
return self._append(EMR.CHORD(left,top,right,bottom, | return self._append(_EMR._CHORD(left,top,right,bottom, | def Chord(self,left,top,right,bottom,xstart,ystart,xend,yend): """ |
return self._append(EMR.PIE(left,top,right,bottom, | return self._append(_EMR._PIE(left,top,right,bottom, | def Pie(self,left,top,right,bottom,xstart,ystart,xend,yend): """ |
return self._appendOptimize16(points,EMR.POLYBEZIER16,EMR.POLYBEZIER) | return self._appendOptimize16(points,_EMR._POLYBEZIER16,_EMR._POLYBEZIER) | def PolyBezier(self,points): """ |
return self._append(EMR.BEGINPATH()) | return self._append(_EMR._BEGINPATH()) | def BeginPath(self): """ |
return self._append(EMR.ENDPATH()) | return self._append(_EMR._ENDPATH()) | def EndPath(self): """ |
return self._append(EMR.MOVETOEX(x,y)) | return self._append(_EMR._MOVETOEX(x,y)) | def MoveTo(self,x,y): """ |
return self._append(EMR.LINETO(x,y)) | return self._append(_EMR._LINETO(x,y)) | def LineTo(self,x,y): """ |
return self._appendOptimize16(points,EMR.POLYLINETO16,EMR.POLYLINETO) | return self._appendOptimize16(points,_EMR._POLYLINETO16,_EMR._POLYLINETO) | def PolylineTo(self,points): """ |
return self._append(EMR.ARCTO(left,top,right,bottom, | return self._append(_EMR._ARCTO(left,top,right,bottom, | def ArcTo(self,left,top,right,bottom,xstart,ystart,xend,yend): """ |
return self._appendOptimize16(points,EMR.POLYBEZIERTO16,EMR.POLYBEZIERTO) | return self._appendOptimize16(points,_EMR._POLYBEZIERTO16,_EMR._POLYBEZIERTO) | def PolyBezierTo(self,points): """ |
return self._append(EMR.CLOSEFIGURE()) | return self._append(_EMR._CLOSEFIGURE()) | def CloseFigure(self): """ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.