michael@0: michael@0: /* michael@0: * Copyright 2006 The Android Open Source Project michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: michael@0: #ifndef SkScanPriv_DEFINED michael@0: #define SkScanPriv_DEFINED michael@0: michael@0: #include "SkScan.h" michael@0: #include "SkBlitter.h" michael@0: michael@0: class SkScanClipper { michael@0: public: michael@0: SkScanClipper(SkBlitter* blitter, const SkRegion* clip, const SkIRect& bounds, michael@0: bool skipRejectTest = false); michael@0: michael@0: SkBlitter* getBlitter() const { return fBlitter; } michael@0: const SkIRect* getClipRect() const { return fClipRect; } michael@0: michael@0: private: michael@0: SkRectClipBlitter fRectBlitter; michael@0: SkRgnClipBlitter fRgnBlitter; michael@0: SkBlitter* fBlitter; michael@0: const SkIRect* fClipRect; michael@0: }; michael@0: michael@0: // clipRect == null means path is entirely inside the clip michael@0: void sk_fill_path(const SkPath& path, const SkIRect* clipRect, michael@0: SkBlitter* blitter, int start_y, int stop_y, int shiftEdgesUp, michael@0: const SkRegion& clipRgn); michael@0: michael@0: // blit the rects above and below avoid, clipped to clip michael@0: void sk_blit_above(SkBlitter*, const SkIRect& avoid, const SkRegion& clip); michael@0: void sk_blit_below(SkBlitter*, const SkIRect& avoid, const SkRegion& clip); michael@0: michael@0: #endif