SkPath1DPathEffect Class Reference

#include <Sk1DPathEffect.h>

Inherits Sk1DPathEffect.

Collaboration diagram for SkPath1DPathEffect:
Collaboration graph
[legend]

List of all members.

Public Types

enum  Style { kTranslate_Style, kRotate_Style, kMorph_Style, kStyleCount }

Public Member Functions

 SkPath1DPathEffect (const SkPath &path, SkScalar advance, SkScalar phase, Style)
virtual bool filterPath (SkPath *dst, const SkPath &src, SkScalar *width)

Protected Member Functions

 SkPath1DPathEffect (SkFlattenableReadBuffer &buffer)
virtual SkScalar begin (SkScalar contourLength)
virtual SkScalar next (SkPath *dst, SkScalar distance, SkPathMeasure &)
virtual void flatten (SkFlattenableWriteBuffer &)
virtual Factory getFactory ()

Detailed Description

Definition at line 47 of file Sk1DPathEffect.h.


Member Enumeration Documentation

Enumerator:
kTranslate_Style 
kRotate_Style 
kMorph_Style 
kStyleCount 

Definition at line 49 of file Sk1DPathEffect.h.


Constructor & Destructor Documentation

SkPath1DPathEffect::SkPath1DPathEffect ( const SkPath path,
SkScalar  advance,
SkScalar  phase,
Style   
)

Dash by replicating the specified path.

Parameters:
path The path to replicate (dash)
advance The space between instances of path
phase distance (mod advance) along path for its initial position
style how to transform path at each point (based on the current position and tangent)
SkPath1DPathEffect::SkPath1DPathEffect ( SkFlattenableReadBuffer buffer  )  [protected]

Member Function Documentation

virtual SkScalar SkPath1DPathEffect::begin ( SkScalar  contourLength  )  [protected, virtual]

Called at the start of each contour, returns the initial offset into that contour.

Implements Sk1DPathEffect.

virtual bool SkPath1DPathEffect::filterPath ( SkPath dst,
const SkPath src,
SkScalar width 
) [virtual]

Given a src path and a width value, return true if the patheffect has produced a new path (dst) and a new width value. If false is returned, ignore dst and width. On input, width >= 0 means the src should be stroked On output, width >= 0 means the dst should be stroked

Reimplemented from Sk1DPathEffect.

virtual void SkPath1DPathEffect::flatten ( SkFlattenableWriteBuffer  )  [protected, virtual]

Override this to write data specific to your subclass into the buffer, being sure to call your super-class' version first. This data will later be passed to your Factory function, returned by getFactory().

Reimplemented from SkFlattenable.

virtual Factory SkPath1DPathEffect::getFactory (  )  [inline, protected, virtual]

Implement this to return a factory function pointer that can be called to recreate your class given a buffer (previously written to by your override of flatten().

Implements SkFlattenable.

Definition at line 77 of file Sk1DPathEffect.h.

virtual SkScalar SkPath1DPathEffect::next ( SkPath dst,
SkScalar  distance,
SkPathMeasure  
) [protected, virtual]

Called with the current distance along the path, with the current matrix for the point/tangent at the specified distance. Return the distance to travel for the next call. If return <= 0, then that contour is done.

Implements Sk1DPathEffect.


The documentation for this class was generated from the following file:

Generated on Tue Oct 20 11:03:42 2009 for Skia by  doxygen 1.6.1