Lines Matching refs:unit
72 * Dimension contains a value and an unit to represent different
79 constexpr explicit Dimension(double value, DimensionUnit unit = DimensionUnit::PX) : value_(value), unit_(unit) {}
109 void SetUnit(DimensionUnit unit)
111 unit_ = unit;
143 // Percentage unit conversion is not supported.
146 // Percentage unit conversion is not supported.
149 // Percentage unit conversion is not supported.
163 double GetNativeValue(DimensionUnit unit) const
165 if (unit_ == unit || unit == DimensionUnit::PERCENT) {
167 } else if (unit == DimensionUnit::PX) {
169 } else if (unit == DimensionUnit::FP) {
176 // support percentage unit conversion
206 * Add two dimensions using the same unit.
218 * Add a new dimension to itself using same unit.
228 * Minus a dimension using the same unit.
248 * Minus a dimension to itself using the same unit.