From d320001807168f5565bab9807ef13c111096bbb3 Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Fri, 15 Mar 2013 14:25:54 -0700 Subject: [PATCH] Fix errors in Canvas.EdgeType docs Issue #7722363 Fix Canvas EdgeType docs Change-Id: I2908ff22879eb5996da73a37dae1a4cabf82fffb --- graphics/java/android/graphics/Canvas.java | 27 ++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/graphics/java/android/graphics/Canvas.java b/graphics/java/android/graphics/Canvas.java index 9bb90f17fb139..0cb5c1b9843cf 100644 --- a/graphics/java/android/graphics/Canvas.java +++ b/graphics/java/android/graphics/Canvas.java @@ -683,8 +683,16 @@ public class Canvas { } public enum EdgeType { + + /** + * Black-and-White: Treat edges by just rounding to nearest pixel boundary + */ BW(0), //!< treat edges by just rounding to nearest pixel boundary - AA(1); //!< treat edges by rounding-out, since they may be antialiased + + /** + * Antialiased: Treat edges by rounding-out, since they may be antialiased + */ + AA(1); EdgeType(int nativeInt) { this.nativeInt = nativeInt; @@ -703,7 +711,9 @@ public class Canvas { * therefore you can skip making the draw calls). * * @param rect the rect to compare with the current clip - * @param type specifies how to treat the edges (BW or antialiased) + * @param type {@link Canvas.EdgeType#AA} if the path should be considered antialiased, + * since that means it may affect a larger area (more pixels) than + * non-antialiased ({@link Canvas.EdgeType#BW}). * @return true if the rect (transformed by the canvas' matrix) * does not intersect with the canvas' clip */ @@ -720,10 +730,9 @@ public class Canvas { * (i.e. the bounds of the path intersects, but the path does not). * * @param path The path to compare with the current clip - * @param type true if the path should be considered antialiased, - * since that means it may - * affect a larger area (more pixels) than - * non-antialiased. + * @param type {@link Canvas.EdgeType#AA} if the path should be considered antialiased, + * since that means it may affect a larger area (more pixels) than + * non-antialiased ({@link Canvas.EdgeType#BW}). * @return true if the path (transformed by the canvas' matrix) * does not intersect with the canvas' clip */ @@ -745,9 +754,9 @@ public class Canvas { * current clip * @param bottom The bottom of the rectangle to compare with the * current clip - * @param type true if the rect should be considered antialiased, - * since that means it may affect a larger area (more - * pixels) than non-antialiased. + * @param type {@link Canvas.EdgeType#AA} if the path should be considered antialiased, + * since that means it may affect a larger area (more pixels) than + * non-antialiased ({@link Canvas.EdgeType#BW}). * @return true if the rect (transformed by the canvas' matrix) * does not intersect with the canvas' clip */