Remove SkFontArguments::Axis.
Replaced with SkFontArguments::VariationPosition and SkFontArguments::VariationPosition::Coordinate since the arguments are about a variation specification and it's coordinates. SkFontParameters::Axis actually deals with axes and their properties. Change-Id: I377c9c5efa8e7b7e2649fc038f765062e30391e5 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302905 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
This commit is contained in:
parent
4d680cdf07
commit
c0693db3f5
@ -21,11 +21,6 @@ struct SkFontArguments {
|
|||||||
const Coordinate* coordinates;
|
const Coordinate* coordinates;
|
||||||
int coordinateCount;
|
int coordinateCount;
|
||||||
};
|
};
|
||||||
// deprecated, use VariationPosition::Coordinate instead
|
|
||||||
struct Axis {
|
|
||||||
SkFourByteTag fTag;
|
|
||||||
float fStyleValue;
|
|
||||||
};
|
|
||||||
|
|
||||||
SkFontArguments() : fCollectionIndex(0), fVariationDesignPosition{nullptr, 0} {}
|
SkFontArguments() : fCollectionIndex(0), fVariationDesignPosition{nullptr, 0} {}
|
||||||
|
|
||||||
@ -39,14 +34,6 @@ struct SkFontArguments {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// deprecated, use setVariationDesignPosition instead.
|
|
||||||
SkFontArguments& setAxes(const Axis* axes, int axisCount) {
|
|
||||||
fVariationDesignPosition.coordinates =
|
|
||||||
reinterpret_cast<const VariationPosition::Coordinate*>(axes);
|
|
||||||
fVariationDesignPosition.coordinateCount = axisCount;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Specify a position in the variation design space.
|
/** Specify a position in the variation design space.
|
||||||
*
|
*
|
||||||
* Any axis not specified will use the default value.
|
* Any axis not specified will use the default value.
|
||||||
@ -63,11 +50,7 @@ struct SkFontArguments {
|
|||||||
int getCollectionIndex() const {
|
int getCollectionIndex() const {
|
||||||
return fCollectionIndex;
|
return fCollectionIndex;
|
||||||
}
|
}
|
||||||
// deprecated, use getVariationDesignPosition instead.
|
|
||||||
const Axis* getAxes(int* axisCount) const {
|
|
||||||
*axisCount = fVariationDesignPosition.coordinateCount;
|
|
||||||
return reinterpret_cast<const Axis*>(fVariationDesignPosition.coordinates);
|
|
||||||
}
|
|
||||||
VariationPosition getVariationDesignPosition() const {
|
VariationPosition getVariationDesignPosition() const {
|
||||||
return fVariationDesignPosition;
|
return fVariationDesignPosition;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user