aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/SkBitmap_Reference.bmh
diff options
context:
space:
mode:
Diffstat (limited to 'docs/SkBitmap_Reference.bmh')
-rw-r--r--docs/SkBitmap_Reference.bmh32
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/SkBitmap_Reference.bmh b/docs/SkBitmap_Reference.bmh
index a7cfb1dda1..8f241e3f85 100644
--- a/docs/SkBitmap_Reference.bmh
+++ b/docs/SkBitmap_Reference.bmh
@@ -3438,6 +3438,38 @@ SK_DEBUG is defined at compile time.
# ------------------------------------------------------------------------------
+#Method void toString(SkString* str) const;
+#In Utility
+#Line # converts Bitmap to machine readable form ##
+
+Creates string representation of Bitmap. The representation is read by
+internal debugging tools.
+
+#Param str storage for string representation ##
+
+#Example
+ SkBitmap bitmap;
+ int width = 6;
+ int height = 11;
+ bitmap.allocPixels(SkImageInfo::MakeN32Premul(width, height));
+ SkString string;
+ bitmap.toString(&string);
+ SkString match;
+ match.printf("(%d, %d)", width, height);
+ int start = string.find(match.c_str());
+ if (start >= 0) {
+ SkString whStr(&string.c_str()[start], match.size());
+ SkDebugf("bitmap dimensions %s\n", whStr.c_str());
+ }
+ #StdOut
+ bitmap dimensions (6, 11)
+ ##
+##
+
+#SeeAlso SkPaint::toString
+
+##
+
#Class SkBitmap ##
#Topic Bitmap ##