Table Of Contents

Previous topic

dcGraphicsPath

Next topic

images

This Page

phoenix_title dcGraphicsState

Each instance holds the current graphics state. It can be saved (pushed) and restored (popped) by the owning parent


class_hierarchy Inheritance Diagram

Inheritance diagram for class dcGraphicsState

Inheritance diagram of dcGraphicsState


method_summary Methods Summary

__init__ Creates an instance with default values
Get_angle Return rotation angle in degrees
Get_x Return x co-ordinate using graphic states and transforms
Get_y Return y co-ordinate using graphic states and transforms
Rotate Compute the (text only) rotation angle
Scale scale the current co-ordinates
Skew  
Translate move the origin from the current point to (dx,dy)
Ytop Return y co-ordinate wrt top of current page

api Class API



class dcGraphicsState

Each instance holds the current graphics state. It can be saved (pushed) and restored (popped) by the owning parent


Methods



__init__(self)

Creates an instance with default values



Get_angle(self)

Return rotation angle in degrees



Get_x(self, x=0, y=0)

Return x co-ordinate using graphic states and transforms Input x,y are current co-ords



Get_y(self, x=0, y=0)

Return y co-ordinate using graphic states and transforms Input x,y are current co-ords



Rotate(self, cosA, sinA)

Compute the (text only) rotation angle sinA is inverted to cancel the original inversion in pdfviewer.drawfile that was introduced because of the difference in y direction between pdf and GraphicsContext co-ordinates



Scale(self, sx, sy)

scale the current co-ordinates



Skew(self, tanAlpha, tanBeta)


Translate(self, dx, dy)

move the origin from the current point to (dx,dy)



Ytop(self, y)

Return y co-ordinate wrt top of current page