You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implicit and explicit bounds was implemented in #141.
This issue suggest some changes to the interface defined in Bounded, especially for the bounded method.
The old API has been (since 0.5.x):
/// Returns a bounded object with a bounding box populated in [bounds] (and /// in any subitem bounding boxes too). Other properties are left intact. /// /// The returned subtype must be the same as the type of this. /// /// The [recalculate] parameter: /// * false: `bounds` for a returned object is calculated if [bounds] is null /// * true: `bounds` for a returned object is always recalculated /// /// When a calculated bounding box equals to the current bounds of this (or /// bounds cannot be calculated), it's allowed for implementations to return /// `this`. /// /// The `bounds` in returned bounded object may still be null, if bounds /// cannot be calculated (for example in the case of an empty geometry).Boundedbounded({bool recalculate =false});
However there are some inconsistencies on implementations.
The new API would be:
/// Returns a bounded object of the same subtype as this with certain /// properties populated. /// /// If nothing is populated then `this` is returned. /// /// If [onBounds] is true (as by default): /// * The `bounds` in a returned bounded object is ensured to be populated /// (expect when cannot be calculated, for example in the case of an empty /// geometry). /// * If [traverse] is true, then also bounding boxes of any child bounded /// objects are populated.Boundedpopulated({
bool traverse =false,
bool onBounds =true,
});
/// Returns a bounded object of the same subtype as this with certain /// properties unpopulated (or cleared). /// /// If nothing is unpopulated then `this` is returned. /// /// If [onBounds] is true (as by default): /// * The `bounds` in a returned bounded object is ensured to be unpopulated. /// * If [traverse] is true, then also bounding boxes of any child bounded /// objects are unpopulated.Boundedunpopulated({
bool traverse =false,
bool onBounds =true,
});
The new API shall be released in version 0.6.x. This old API shall be deprecated, to be removed by version 1.0.0.
The text was updated successfully, but these errors were encountered:
Implicit and explicit bounds was implemented in #141.
This issue suggest some changes to the interface defined in
Bounded
, especially for thebounded
method.The old API has been (since 0.5.x):
However there are some inconsistencies on implementations.
The new API would be:
The new API shall be released in version 0.6.x. This old API shall be deprecated, to be removed by version 1.0.0.
The text was updated successfully, but these errors were encountered: