本文整理汇总了C++中TransformationMatrix::b方法的典型用法代码示例。如果您正苦于以下问题:C++ TransformationMatrix::b方法的具体用法?C++ TransformationMatrix::b怎么用?C++ TransformationMatrix::b使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TransformationMatrix
的用法示例。
在下文中一共展示了TransformationMatrix::b方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: valueAsString
String SVGTransformList::valueAsString() const
{
// TODO: We may want to build a real transform string, instead of concatting to a matrix(...).
SVGTransform transform = concatenate();
if (transform.type() == SVGTransform::SVG_TRANSFORM_MATRIX) {
TransformationMatrix matrix = transform.matrix();
return String::format("matrix(%f %f %f %f %f %f)", matrix.a(), matrix.b(), matrix.c(), matrix.d(), matrix.e(), matrix.f());
}
return String();
}
示例2: PrintTo
void PrintTo(const AnimatableTransform& animTransform, ::std::ostream* os)
{
TransformOperations ops = animTransform.transformOperations();
*os << "AnimatableTransform(";
// FIXME: TransformOperations should really have it's own pretty-printer
// then we could just call that.
// FIXME: Output useful names not just the raw matrixes.
for (unsigned i = 0; i < ops.size(); i++) {
const TransformOperation* op = ops.at(i);
TransformationMatrix matrix;
op->apply(matrix, FloatSize(1.0, 1.0));
*os << "[";
if (matrix.isAffine()) {
*os << matrix.a();
*os << " " << matrix.b();
*os << " " << matrix.c();
*os << " " << matrix.d();
*os << " " << matrix.e();
*os << " " << matrix.f();
} else {
*os << matrix.m11();
*os << " " << matrix.m12();
*os << " " << matrix.m13();
*os << " " << matrix.m14();
*os << " ";
*os << " " << matrix.m21();
*os << " " << matrix.m22();
*os << " " << matrix.m23();
*os << " " << matrix.m24();
*os << " ";
*os << " " << matrix.m31();
*os << " " << matrix.m32();
*os << " " << matrix.m33();
*os << " " << matrix.m34();
*os << " ";
*os << " " << matrix.m41();
*os << " " << matrix.m42();
*os << " " << matrix.m43();
*os << " " << matrix.m44();
}
*os << "]";
if (i < ops.size() - 1)
*os << ", ";
}
*os << ")";
}
示例3: drawPattern
void Image::drawPattern(GraphicsContext *gc, const FloatRect& srcRect, const AffineTransform& patternTransform,
const FloatPoint& phase, ColorSpace, CompositeOperator, const FloatRect& destRect, BlendMode)
{
JNIEnv* env = WebCore_GetJavaEnv();
if (!gc || gc->paintingDisabled() || srcRect.isEmpty()) {
return;
}
NativeImagePtr currFrame = nativeImageForCurrentFrame();
if (!currFrame) {
return;
}
TransformationMatrix tm = patternTransform.toTransformationMatrix();
static jmethodID mid = env->GetMethodID(PG_GetGraphicsManagerClass(env),
"createTransform",
"(DDDDDD)Lcom/sun/webkit/graphics/WCTransform;");
ASSERT(mid);
JLObject transform(env->CallObjectMethod(PL_GetGraphicsManager(env), mid,
tm.a(), tm.b(), tm.c(), tm.d(), tm.e(), tm.f()));
ASSERT(transform);
CheckAndClearException(env);
gc->platformContext()->rq().freeSpace(13 * 4)
<< (jint)com_sun_webkit_graphics_GraphicsDecoder_DRAWPATTERN
<< currFrame
<< srcRect.x() << srcRect.y() << srcRect.width() << srcRect.height()
<< RQRef::create(transform)
<< phase.x() << phase.y()
<< destRect.x() << destRect.y() << destRect.width() << destRect.height();
if (imageObserver())
imageObserver()->didDraw(this);
}
示例4: create
PassOwnPtr<CCTransformKeyframe> CCTransformKeyframe::clone() const
{
// We need to do a deep copy the m_value may contain ref pointers to TransformOperation objects.
TransformOperations operations;
for (size_t j = 0; j < m_value.size(); ++j) {
TransformOperation::OperationType operationType = m_value.operations()[j]->getOperationType();
switch (operationType) {
case TransformOperation::SCALE_X:
case TransformOperation::SCALE_Y:
case TransformOperation::SCALE_Z:
case TransformOperation::SCALE_3D:
case TransformOperation::SCALE: {
ScaleTransformOperation* transform = static_cast<ScaleTransformOperation*>(m_value.operations()[j].get());
operations.operations().append(ScaleTransformOperation::create(transform->x(), transform->y(), transform->z(), operationType));
break;
}
case TransformOperation::TRANSLATE_X:
case TransformOperation::TRANSLATE_Y:
case TransformOperation::TRANSLATE_Z:
case TransformOperation::TRANSLATE_3D:
case TransformOperation::TRANSLATE: {
TranslateTransformOperation* transform = static_cast<TranslateTransformOperation*>(m_value.operations()[j].get());
operations.operations().append(TranslateTransformOperation::create(transform->x(), transform->y(), transform->z(), operationType));
break;
}
case TransformOperation::ROTATE_X:
case TransformOperation::ROTATE_Y:
case TransformOperation::ROTATE_3D:
case TransformOperation::ROTATE: {
RotateTransformOperation* transform = static_cast<RotateTransformOperation*>(m_value.operations()[j].get());
operations.operations().append(RotateTransformOperation::create(transform->x(), transform->y(), transform->z(), transform->angle(), operationType));
break;
}
case TransformOperation::SKEW_X:
case TransformOperation::SKEW_Y:
case TransformOperation::SKEW: {
SkewTransformOperation* transform = static_cast<SkewTransformOperation*>(m_value.operations()[j].get());
operations.operations().append(SkewTransformOperation::create(transform->angleX(), transform->angleY(), operationType));
break;
}
case TransformOperation::MATRIX: {
MatrixTransformOperation* transform = static_cast<MatrixTransformOperation*>(m_value.operations()[j].get());
TransformationMatrix m = transform->matrix();
operations.operations().append(MatrixTransformOperation::create(m.a(), m.b(), m.c(), m.d(), m.e(), m.f()));
break;
}
case TransformOperation::MATRIX_3D: {
Matrix3DTransformOperation* transform = static_cast<Matrix3DTransformOperation*>(m_value.operations()[j].get());
operations.operations().append(Matrix3DTransformOperation::create(transform->matrix()));
break;
}
case TransformOperation::PERSPECTIVE: {
PerspectiveTransformOperation* transform = static_cast<PerspectiveTransformOperation*>(m_value.operations()[j].get());
operations.operations().append(PerspectiveTransformOperation::create(transform->perspective()));
break;
}
case TransformOperation::IDENTITY: {
operations.operations().append(IdentityTransformOperation::create());
break;
}
case TransformOperation::NONE:
// Do nothing.
break;
} // switch
} // for each operation
return CCTransformKeyframe::create(time(), operations, timingFunction() ? cloneTimingFunction(timingFunction()) : nullptr);
}