Texture::Texture(QString path, unsigned int _index) { load(path); gluid = 0; glunit = unitFromIndex(_index); index = _index; minFilter = GL_LINEAR; magFilter = GL_LINEAR; globalFormat = GL_RGBA; }
Texture::Texture(unsigned int _index) { height = 0; width = 0; hasImage = false; format = GL_RGBA; index = _index; glunit = unitFromIndex(_index); gluid = 0; hasImage = false; minFilter = GL_LINEAR; magFilter = GL_LINEAR; globalFormat = GL_RGBA; }
RawPtr<CSSValue> StyleCalcLength::toCSSValue() const { // Create a CSS Calc Value, then put it into a CSSPrimitiveValue RawPtr<CSSCalcExpressionNode> node = nullptr; for (unsigned i = 0; i < LengthValue::kNumSupportedUnits; ++i) { if (!hasAtIndex(i)) continue; double value = getAtIndex(i); if (node) { node = CSSCalcValue::createExpressionNode( node, CSSCalcValue::createExpressionNode(CSSPrimitiveValue::create(std::abs(value), unitFromIndex(i))), value >= 0 ? CalcAdd : CalcSubtract); } else { node = CSSCalcValue::createExpressionNode(CSSPrimitiveValue::create(value, unitFromIndex(i))); } } return CSSPrimitiveValue::create(CSSCalcValue::create(node)); }