Package com.jetbrains

Interface GraphicsUtils.ConstrainableGraphics2D

Enclosing interface:
GraphicsUtils

@Provides public static interface GraphicsUtils.ConstrainableGraphics2D
Allows to permanently install a rectangular maximum clip that cannot be extended with setClip. This is similar to sun.awt.ConstrainableGraphics, but allows floating-point coordinates.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    constrain(int x, int y, int w, int h)
    Constrain this graphics object to have a permanent device space origin of (x, y) and a permanent maximum clip of (x,y,w,h).
    void
    Constrain this graphics object to have a permanent device space origin of (x, y) and a permanent maximum clip of (x,y,w,h).
    Destination that this Graphics renders to.
  • Method Details

    • getDestination

      Object getDestination()
      Destination that this Graphics renders to. Similar to sun.java2d.SunGraphics2D#getDestination().
      Returns:
      rendering destination
    • constrain

      void constrain(Rectangle2D region)
      Constrain this graphics object to have a permanent device space origin of (x, y) and a permanent maximum clip of (x,y,w,h). This overload allows floating-point coordinates.
      Parameters:
      region - constraint rectangle
      See Also:
    • constrain

      void constrain(int x, int y, int w, int h)
      Constrain this graphics object to have a permanent device space origin of (x, y) and a permanent maximum clip of (x,y,w,h). Similar to sun.awt.ConstrainableGraphics#constrain(int, int, int, int).
      Parameters:
      x - x coordinate of the constraint rectangle
      y - y coordinate of the constraint rectangle
      w - width of the constraint rectangle
      h - height of the constraint rectangle