Line2DPathEffect

class Line2DPathEffect

Classes

DashInfo

DashType

If the PathEffect can be represented as a dash pattern, asADash

PointData

PointData aggregates all the information needed to draw the point primitives returned by an asPoints call.

Type

Members:

Methods

Deserialize

GetFlattenableType

Make

MakeCompose

Returns a patheffect that applies the inner effect to the path, and then applies the outer effect to the result of the inner's.

MakeSum

Returns a patheffect that apples each effect (first and second) to the original path, and returns a path with the sum of these.

RegisterFlattenables

__init__

asADash

asPoints

Does applying this path effect to 'src' yield a set of points? If so, optionally return the points in 'results'.

computeFastBounds

Compute a conservative bounds for its effect, given the src bounds.

filterPath

Given a src path (input) and a stroke-rec (input and output), apply this effect to the src path, returning the new path in dst, and return true.

getFlattenableType

getTypeName

Returns the name of the object's class.

ref

Increment the reference count.

serialize

unique

May return true if the caller is the only owner.

unref

Decrement the reference count.

Attributes

kColorFilter_Type

kDash_DashType

kDrawLooper_Type

kDrawable_Type

kImageFilter_Type

kMaskFilter_Type

kNone_DashType

kPathEffect_Type

kPixelRef_Type

kShaderBase_Type

kUnused_Type

kUnused_Type2

kUnused_Type3

kUnused_Type4

Methods

static Line2DPathEffect.Deserialize(data: Buffer) skia.PathEffect
static Line2DPathEffect.GetFlattenableType() skia.Flattanable.Type
static Line2DPathEffect.Make(width: float, matrix: skia.Matrix) skia.PathEffect
static Line2DPathEffect.MakeCompose(outer: skia.PathEffect, inner: skia.PathEffect) skia.PathEffect

Returns a patheffect that applies the inner effect to the path, and then applies the outer effect to the result of the inner’s.

result = outer(inner(path))

static Line2DPathEffect.MakeSum(first: skia.PathEffect, second: skia.PathEffect) skia.PathEffect

Returns a patheffect that apples each effect (first and second) to the original path, and returns a path with the sum of these.

result = first(path) + second(path)

static Line2DPathEffect.RegisterFlattenables() None
Line2DPathEffect.__init__(*args, **kwargs)
Line2DPathEffect.asADash(self: skia.PathEffect, info: skia.PathEffect.DashInfo) skia.PathEffect.DashType
Line2DPathEffect.asPoints(self: skia.PathEffect, results: skia.PathEffect.PointData, src: SkPath, stroke_rec: skia.StrokeRec, matrix: skia.Matrix, cullR: skia.Rect) bool

Does applying this path effect to ‘src’ yield a set of points? If so, optionally return the points in ‘results’.

Line2DPathEffect.computeFastBounds(self: skia.PathEffect, dst: skia.Rect, src: skia.Rect) None

Compute a conservative bounds for its effect, given the src bounds.

The baseline implementation just assigns src to dst.

Line2DPathEffect.filterPath(self: skia.PathEffect, dst: SkPath, src: SkPath, stroke_rec: skia.StrokeRec, cullR: skia.Rect) bool

Given a src path (input) and a stroke-rec (input and output), apply this effect to the src path, returning the new path in dst, and return true.

If this effect cannot be applied, return false and ignore dst and stroke-rec.

The stroke-rec specifies the initial request for stroking (if any). The effect can treat this as input only, or it can choose to change the rec as well. For example, the effect can decide to change the stroke’s width or join, or the effect can change the rec from stroke to fill (or fill to stroke) in addition to returning a new (dst) path.

If this method returns true, the caller will apply (as needed) the resulting stroke-rec to dst and then draw.

Line2DPathEffect.getFlattenableType(self: skia.Flattanable) skia.Flattanable.Type
Line2DPathEffect.getTypeName(self: skia.Flattanable) str

Returns the name of the object’s class.

Implemented in Drawable.

Line2DPathEffect.ref(self: skia.RefCntBase) None

Increment the reference count.

Must be balanced by a call to unref().

Line2DPathEffect.serialize(self: skia.Flattanable) skia.Data
Line2DPathEffect.unique(self: skia.RefCntBase) bool

May return true if the caller is the only owner.

Ensures that all previous owner’s actions are complete.

Line2DPathEffect.unref(self: skia.RefCntBase) None

Decrement the reference count.

If the reference count is 1 before the decrement, then delete the object. Note that if this is the case, then the object needs to have been allocated via new, and not on the stack.

Attributes

Line2DPathEffect.kColorFilter_Type = <Type.kColorFilter_Type: 0>
Line2DPathEffect.kDash_DashType = <DashType.kDash_DashType: 1>
Line2DPathEffect.kDrawLooper_Type = <Type.kDrawLooper_Type: 2>
Line2DPathEffect.kDrawable_Type = <Type.kDrawable_Type: 1>
Line2DPathEffect.kImageFilter_Type = <Type.kImageFilter_Type: 3>
Line2DPathEffect.kMaskFilter_Type = <Type.kMaskFilter_Type: 4>
Line2DPathEffect.kNone_DashType = <DashType.kNone_DashType: 0>
Line2DPathEffect.kPathEffect_Type = <Type.kPathEffect_Type: 5>
Line2DPathEffect.kPixelRef_Type = <Type.kPixelRef_Type: 6>
Line2DPathEffect.kShaderBase_Type = <Type.kShaderBase_Type: 8>
Line2DPathEffect.kUnused_Type = <Type.kUnused_Type: 9>
Line2DPathEffect.kUnused_Type2 = <Type.kUnused_Type2: 10>
Line2DPathEffect.kUnused_Type3 = <Type.kUnused_Type3: 11>
Line2DPathEffect.kUnused_Type4 = <Type.kUnused_Type4: 7>