aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/core/SkBitmap.h13
-rw-r--r--include/utils/SkCamera.h2
2 files changed, 15 insertions, 0 deletions
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index a38cafa..64a2a5b 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -470,6 +470,19 @@ public:
this->extractAlpha(dst, paint, NULL, offset);
}
+ /** Set dst to contain alpha layer of this bitmap. If destination bitmap
+ fails to be initialized, e.g. because allocator can't allocate pixels
+ for it, dst will be resetted (zero width and height, no pixels).
+
+ @param dst The bitmap to be filled with alpha layer
+ @param paint The paint to draw with
+ @param allocator Allocator used to allocate the pixelref for the dst
+ bitmap. If this is null, the standard HeapAllocator
+ will be used.
+ @param offset If not null, it is set to top-left coordinate to position
+ the returned bitmap so that it visually lines up with the
+ original
+ */
void extractAlpha(SkBitmap* dst, const SkPaint* paint, Allocator* allocator,
SkIPoint* offset) const;
diff --git a/include/utils/SkCamera.h b/include/utils/SkCamera.h
index 8bbcabf..96eacb3 100644
--- a/include/utils/SkCamera.h
+++ b/include/utils/SkCamera.h
@@ -157,6 +157,8 @@ public:
void rotateY(SkScalar deg);
void rotateZ(SkScalar deg);
+ void setCameraLocation(SkScalar x, SkScalar y, SkScalar z);
+
void getMatrix(SkMatrix*) const;
void applyToCanvas(SkCanvas*) const;