pytoshop.path

Handle Bézier paths.

class pytoshop.path.ClipboardRecord(top=0.0, left=0.0, bottom=0.0, right=0.0, resolution=0)[source]

Bases: pytoshop.path.PathRecord

bottom

bottom, in pixels

left

left, in pixels

classmethod read_data(fd, header)[source]
resolution
right

right, in pixels

top

top, in pixels

write_data(fd, header)[source]
class pytoshop.path.ClosedSubpathBezierKnotLinked(y0=0.0, x0=0.0, y1=None, x1=None, y2=None, x2=None)[source]

Bases: pytoshop.path._PointRecord

class pytoshop.path.ClosedSubpathBezierKnotUnlinked(y0=0.0, x0=0.0, y1=None, x1=None, y2=None, x2=None)[source]

Bases: pytoshop.path._PointRecord

class pytoshop.path.ClosedSubpathLengthRecord(num_knots=0)[source]

Bases: pytoshop.path._LengthRecord

class pytoshop.path.InitialFillRuleRecord(all_pixels=False)[source]

Bases: pytoshop.path.PathRecord

all_pixels

Fill starts with all pixels

classmethod read_data(fd, header)[source]
write_data(fd, header)[source]
class pytoshop.path.OpenSubpathBezierKnotLinked(y0=0.0, x0=0.0, y1=None, x1=None, y2=None, x2=None)[source]

Bases: pytoshop.path._PointRecord

class pytoshop.path.OpenSubpathBezierKnotUnlinked(y0=0.0, x0=0.0, y1=None, x1=None, y2=None, x2=None)[source]

Bases: pytoshop.path._PointRecord

class pytoshop.path.OpenSubpathLengthRecord(num_knots=0)[source]

Bases: pytoshop.path._LengthRecord

class pytoshop.path.PathFillRuleRecord[source]

Bases: pytoshop.path.PathRecord

classmethod read_data(fd, header)[source]
write_data(fd, header)[source]
class pytoshop.path.PathRecord[source]

Bases: object

length(header)[source]
classmethod read(fd, header)[source]
classmethod read_data(fd, header)[source]
type
write(fd, header)[source]
write_data(fd, header)[source]
class pytoshop.path.PathResource(path_records=[])[source]

Bases: object

classmethod from_rect(top, left, bottom, right, all_pixels=True)[source]
length(header)[source]

The length of the section, in bytes, not including its header.

path_records

List of PathRecord instances.

classmethod read(fd, length, header)[source]
write(fd, header)[source]