IT. Expert System.

Android Reference


Class Shape

  • All Implemented Interfaces:
    Direct Known Subclasses:
    PathShape, RectShape

    public abstract class Shape
    extends Object
    implements Cloneable
    Defines a generic graphical "shape." Any Shape can be drawn to a Canvas with its own draw() method, but more graphical control is available if you instead pass it to a ShapeDrawable.
    • Constructor Detail

      • Shape

        public Shape()
    • Method Detail

      • getWidth

        public final float getWidth()
        Returns the width of the Shape.
      • getHeight

        public final float getHeight()
        Returns the height of the Shape.
      • draw

        public abstract void draw(Canvas canvas,
                Paint paint)
        Draw this shape into the provided Canvas, with the provided Paint. Before calling this, you must call resize(float,float).
        canvas - the Canvas within which this shape should be drawn
        paint - the Paint object that defines this shape's characteristics
      • resize

        public final void resize(float width,
                  float height)
        Resizes the dimensions of this shape. Must be called before draw(Canvas,Paint).
        width - the width of the shape (in pixels)
        height - the height of the shape (in pixels)
      • hasAlpha

        public boolean hasAlpha()
        Checks whether the Shape is opaque. Default impl returns true. Override if your subclass can be opaque.
        true if any part of the drawable is not opaque.
      • onResize

        protected void onResize(float width,
                    float height)
        Callback method called when resize(float,float) is executed.
        width - the new width of the Shape
        height - the new height of the Shape
      • clone

        public Shape clone()
                    throws CloneNotSupportedException
        Description copied from class: Object
        Creates and returns a copy of this Object. The default implementation returns a so-called "shallow" copy: It creates a new instance of the same class and then copies the field values (including object references) from this instance to the new instance. A "deep" copy, in contrast, would also recursively clone nested objects. A subclass that needs to implement this kind of cloning should call super.clone() to create the new instance and then create deep copies of the nested, mutable objects.
        clone in class Object
        a copy of this object.
        CloneNotSupportedException - if this object's class does not implement the Cloneable interface.


Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)





Java Script








Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 50 / 158860654. Delta: 0.00513 с