SkSpan<std::unique_ptr<Expression>> argumentSpan() final { return {&fArguments.front(), (size_t)fArguments.size()};
}
SkSpan<const std::unique_ptr<Expression>> argumentSpan() const final { return {&fArguments.front(), (size_t)fArguments.size()};
}
private:
ExpressionArray fArguments;
using INHERITED = AnyConstructor;
};
/** *ConvertsanyGLSLconstructor,suchas`float2(x,y)`or`mat3x3(otherMat)`or`int[2](0,i)`,to *anSkSLexpression. * *Vectorconstructorsmustalwaysconsistofeitherexactly1scalar,oracollectionofvectors *andscalarstotalingexactlytherightnumberofscalarcomponents. * *Matrixconstructorsmustalwaysconsistofeitherexactly1scalar,exactly1matrix,ora *collectionofvectorsandscalarstotalingexactlytherightnumberofscalarcomponents. * *Arrayconstructorsmustalwayscontainthepropernumberofarrayelements(matchingtheType).
*/
namespace Constructor { // Creates, typechecks and simplifies constructor expressions. Reports errors via the // ErrorReporter. This can return null on error, so be careful. There are several different // Constructor expression types; this class chooses the proper one based on context, e.g. // `ConstructorCompound`, `ConstructorScalarCast`, or `ConstructorMatrixResize`.
std::unique_ptr<Expression> Convert(const Context& context,
Position pos, const Type& type,
ExpressionArray args);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.