Lines Matching defs:bitmap

44     /** Style constant: Custom icon with a user-supplied bitmap. */
47 /** Style constant: Null icon. It has no bitmap. */
82 * Gets a special pointer icon that has no bitmap.
149 * Creates a custom pointer from the given bitmap and hotspot information.
151 * @param bitmap The bitmap for the icon.
152 * @param hotspotX The X offset of the pointer icon hotspot in the bitmap.
153 * Must be within the [0, bitmap.getWidth()) range.
154 * @param hotspotY The Y offset of the pointer icon hotspot in the bitmap.
155 * Must be within the [0, bitmap.getHeight()) range.
156 * @return A pointer icon for this bitmap.
158 * @throws IllegalArgumentException if bitmap is null, or if the x/y hotspot
161 public static PointerIcon createCustomIcon(Bitmap bitmap, float hotSpotX, float hotSpotY) {
162 if (bitmap == null) {
163 throw new IllegalArgumentException("bitmap must not be null");
165 validateHotSpot(bitmap, hotSpotX, hotSpotY);
168 icon.mBitmap = bitmap;
181 * android:bitmap="@drawable/my_pointer_bitmap"
206 * Loads the bitmap and hotspot information for a pointer icon, if it is not already loaded.
241 * Returns true if the pointer icon has been loaded and its bitmap and hotspot
261 * Gets the bitmap of the pointer icon.
263 * @return The pointer icon bitmap, or null if the style is {@link #STYLE_NULL}.
265 * @throws IllegalStateException if the bitmap is not loaded.
279 * @throws IllegalStateException if the bitmap is not loaded.
293 * @throws IllegalStateException if the bitmap is not loaded.
323 Bitmap bitmap = Bitmap.CREATOR.createFromParcel(in);
326 return PointerIcon.createCustomIcon(bitmap, hotSpotX, hotSpotY);
397 throw new IllegalArgumentException("<pointer-icon> is missing bitmap attribute.");
402 throw new IllegalArgumentException("<pointer-icon> bitmap attribute must "
403 + "refer to a bitmap drawable.");
412 private static void validateHotSpot(Bitmap bitmap, float hotSpotX, float hotSpotY) {
413 if (hotSpotX < 0 || hotSpotX >= bitmap.getWidth()) {
414 throw new IllegalArgumentException("x hotspot lies outside of the bitmap area");
416 if (hotSpotY < 0 || hotSpotY >= bitmap.getHeight()) {
417 throw new IllegalArgumentException("y hotspot lies outside of the bitmap area");