void CompositorParent::TranslateFixedLayers(Layer* aLayer, const gfxPoint& aTranslation) { if (aLayer->GetIsFixedPosition() && !aLayer->GetParent()->GetIsFixedPosition()) { gfx3DMatrix layerTransform = aLayer->GetTransform(); Translate2D(layerTransform, aTranslation); ShadowLayer* shadow = aLayer->AsShadowLayer(); shadow->SetShadowTransform(layerTransform); const nsIntRect* clipRect = aLayer->GetClipRect(); if (clipRect) { nsIntRect transformedClipRect(*clipRect); transformedClipRect.MoveBy(aTranslation.x, aTranslation.y); shadow->SetShadowClipRect(&transformedClipRect); } } for (Layer* child = aLayer->GetFirstChild(); child; child = child->GetNextSibling()) { TranslateFixedLayers(child, aTranslation); } }
void Painter::DrawImageOp(int x, int y, int cx, int cy, const Image& img, const Rect& src, Color color) { // Color and src support!!! RectPath(x, y, cx, cy); Fill(img, Translate2D(x, y)); }
void Painter::Translate(double x, double y) { Transform(Translate2D(x, y)); }