ExpressiveFeature class abstract
While a polygon's shape can be drawn solely using a list of ExpressiveShapeCubic objects representing its raw curves and lines, features add an extra layer of context to groups of cubics. Features group cubics into (straight) edges, convex corners, or concave corners. For example, rounding a rectangle adds many cubics around its edges, but the rectangle's overall number of corners remains the same. ExpressivePolygonMorph therefore uses this grouping for several reasons:
- Noise Reduction: Grouping cubics reduces the amount of noise introduced by individual cubics (as seen in the rounded rectangle example).
- Mapping Base: The grouping serves as the base set for ExpressivePolygonMorph's mapping process.
- Curve Type Mapping: ExpressivePolygonMorph maps similar curve types (convex, concave) together. Note that edges or features created with ExpressiveFeature.buildIgnorableFeature are ignored in the default mapping.
By using features, you can manipulate polygon shapes with more context and control.
- Implementers
Constructors
-
ExpressiveFeature(List<
ExpressiveShapeCubic> cubics) -
A feature made of
cubics.const -
ExpressiveFeature.buildConcaveCorner(List<
ExpressiveShapeCubic> cubics) -
Group a list of ExpressiveShapeCubic objects to a concave corner (inward indentation
in a shape).
factory
-
ExpressiveFeature.buildConvexCorner(List<
ExpressiveShapeCubic> cubics) -
Group a list of ExpressiveShapeCubic objects to a convex corner (outward indentation
in a shape).
factory
- ExpressiveFeature.buildEdge(ExpressiveShapeCubic cubic)
-
Group a ExpressiveShapeCubic object to an edge (neither inward or outward
identification in a shape).
factory
-
ExpressiveFeature.buildIgnorableFeature(List<
ExpressiveShapeCubic> cubics) -
Group a list of ExpressiveShapeCubic objects to a feature that should be ignored in
the default ExpressivePolygonMorph mapping. The feature can have any indentation.
factory
Properties
-
cubics
→ List<
ExpressiveShapeCubic> -
Returns unmodifiable list of ExpressiveShapeCubic.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isConcaveCorner → bool
-
Whether this Feature is a concave corner (inward indentation in a shape).
no setter
- isConvexCorner → bool
-
Whether this Feature is a convex corner (outward indentation in a shape).
no setter
- isCorner → bool
-
Whether this Feature is a corner.
no setter
- isEdge → bool
-
Whether this Feature is an Edge with no inward or outward indentation.
no setter
- isIgnorableFeature → bool
-
Whether this Feature gets ignored in the Morph mapping. See
ExpressiveFeature.buildIgnorableFeature for more details
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reversed(
) → ExpressiveFeature - Returns a new ExpressiveFeature with the points that define the shape of this ExpressiveFeature in reversed order.
-
toString(
) → String -
A string representation of this object.
inherited
-
transformed(
ExpressivePointTransformer f) → ExpressiveFeature - Transforms the points in this ExpressiveFeature with the given ExpressivePointTransformer and returns a new ExpressiveFeature.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited