/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
void gfxPattern::SetMatrix(const gfxMatrix& aPatternToUserSpace) {
mPatternToUserSpace = ToMatrix(aPatternToUserSpace); // Cairo-pattern matrices specify the conversion from DrawTarget to pattern // space. Azure pattern matrices specify the conversion from pattern to // DrawTarget space.
mPatternToUserSpace.Invert();
}
gfxMatrix gfxPattern::GetMatrix() const { // invert at the higher precision of gfxMatrix // cause we need to convert at some point anyways
gfxMatrix mat = ThebesMatrix(mPatternToUserSpace);
mat.Invert(); return mat;
}
if (aOriginalUserToDevice &&
!aOriginalUserToDevice->FuzzyEquals(aTarget->GetTransform())) { // mPatternToUserSpace maps from pattern space to the original user space, // but aTarget now has a transform to a different user space. In order for // the Pattern* that we return to be usable in aTarget's new user space we // need the Pattern's mMatrix to be the transform from pattern space to // aTarget's -new- user space. That transform is equivalent to the // transform from pattern space to original user space (patternToUser), // multiplied by the transform from original user space to device space, // multiplied by the transform from device space to current user space.
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 ist noch experimentell.