本文整理汇总了C++中AffineTransform::toTransformationMatrix方法的典型用法代码示例。如果您正苦于以下问题:C++ AffineTransform::toTransformationMatrix方法的具体用法?C++ AffineTransform::toTransformationMatrix怎么用?C++ AffineTransform::toTransformationMatrix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AffineTransform
的用法示例。
在下文中一共展示了AffineTransform::toTransformationMatrix方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: applyTransform
// FIXME: We transform AffineTransform to TransformationMatrix. This is rather
// inefficient.
void TransformState::applyTransform(
const AffineTransform& transformFromContainer,
TransformAccumulation accumulate,
bool* wasClamped) {
applyTransform(transformFromContainer.toTransformationMatrix(), accumulate,
wasClamped);
}
示例2: paintWindowedPluginIntoContext
void PluginView::paintWindowedPluginIntoContext(GraphicsContext& context, const IntRect& rect)
{
#if !USE(WINGDI)
ASSERT(m_isWindowed);
ASSERT(context.shouldIncludeChildWindows());
IntPoint locationInWindow = downcast<FrameView>(*parent()).convertToContainingWindow(frameRect().location());
LocalWindowsContext windowsContext(context, frameRect(), false);
#if USE(CAIRO)
// Must flush drawings up to this point to the backing metafile, otherwise the
// plugin region will be overwritten with any clear regions specified in the
// cairo-controlled portions of the rendering.
cairo_show_page(context.platformContext()->cr());
#endif
HDC hdc = windowsContext.hdc();
XFORM originalTransform;
GetWorldTransform(hdc, &originalTransform);
// The plugin expects the DC to be in client coordinates, so we translate
// the DC to make that so.
AffineTransform ctm = context.getCTM();
ctm.translate(locationInWindow.x(), locationInWindow.y());
XFORM transform = static_cast<XFORM>(ctm.toTransformationMatrix());
SetWorldTransform(hdc, &transform);
paintIntoTransformedContext(hdc);
SetWorldTransform(hdc, &originalTransform);
#endif
}
示例3: concatCTM
void GraphicsContextPlatformPrivate::concatCTM(const AffineTransform& transform)
{
if (!m_hdc)
return;
XFORM xform = transform.toTransformationMatrix();
ModifyWorldTransform(m_hdc, &xform, MWT_LEFTMULTIPLY);
}
示例4: setCTM
void GraphicsContextPlatformPrivate::setCTM(const AffineTransform& transform)
{
if (!m_hdc)
return;
XFORM xform = transform.toTransformationMatrix();
SetWorldTransform(m_hdc, &xform);
}
示例5: 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);
}