Java examples for 2D Graphics:Rectangle

Click the following links for the tutorial for 2D Graphics and Rectangle.

- The Rectangle Class
- Drawing lines, rectangles and ovals.
- Draw 3D Rectangle and Square
- Draw Rounded Corner Rectangle and Square
- Fill Rectangle & Square
- Returns the dimensions of the smallest rectangle that could contain the supplied points.
- expand Rectangle2D
- Get Rectangle2D low left corner
- get Rectangle2D low right corner
- Rectangle2D From Center Point
- get Rectangle2D upper left corner
- get Rectangle2D upper right corner
- Calculates a rectangle into two points, where as the points are handled as the diagonal vector.
- center In Rectangle
- fit Rectangle to another Rectangle
- scale Rectangle
- Rectangle r1 is below Rectangle r2
- Rectangle r1 is on the left of Rectangle r2
- Rectangle r1 is on the right of Rectangle r2
- Rectangle r1 is above Rectangle r2
- Returns true if both rectangles are in the same column, taking into account the margin
- Returns true if both rectangles are in the same row, taking into account the margin
- Get Rectangle corners
- quarter Rectangle
- split Rectangle Horizontally
- split Rectangle Vertically
- create Centered Rectangle
- get Point from Rectangle
- grow Rectangle
- inset Rectangle
- set Rectangle Bounds
- to Awt Rectangle
- generate Centered Rectangle
- generate Rectangle2D
- intercept Line And RectangularShape
- Combine these two rectangles into one rectangle that encompasses both
- Return a rectangle that encapsulates all rectangles in the Vector.
- Do these two rectangles overlap
- Do these two rectangles overlap horizontally?
- Do these two rectangles overlap vertically?
- Checks if rectangle r1 is inside rectangle r2
- Check if a specified point is inside a specified rectangle.
- Check if a specified polyline intersects a specified rectangle.
- Checks if point px,py is within the bounds of the rectangle
- are Rectangle Equal
- compact Rectangle2D
- expand Rectangle
- expand Rectangle 2D
- get Rectangle Bottom Center
- get Rectangle2D Center 2D
- get Rectangle Center
- get Rectangle Left Center
- get Rectangle Right Center
- get Rectangle Top Center
- round Rectangle2D to RoundRectangle2D
- Convert Rectangle2D to Rectangle
- union Rectangle array
- Scales the given rectangle by the given scale factor.
- This returns the "local" bounds of a component.
- get Scaled Rectangle Dimensions
- do Fit Rectangle2D
- nearly Equals Rectangle2D
- snug Fit Rectangle2D
- Rectangle intersects
- get Rounded Rectangle
- get Rectangle Centering Point
- draw D Rect
- draw Rect
- fill 3D Rectangle
- fill Gradient Rectangle
- fill Rectangle
- draw Rectangle
- draw Rect with OpenGL
- draw Plain Rect
- draw Round Rect
- fill Rect
- draw Rounded Rect opengl
- gradient Fill Rect
- Returns the point at which to draw a string so that it appears aligned within a given rectangle.
- get Rectangle
- Returns the x,y coordinates of the end point of line starting at startx, starty in the direction of the given heading and of the given length.
- creates a square beginning at x,y and tilted in the direction of the angle.
- darken Rectangle
- draws a line starting at x,y, and going in the direction of the angle
- fill Transparent Bordered Selection Rectangle
- fill Transparent Selection Rectangle
- fix Rectangle
- shade Rectangle
- Draws a 3D rectangle in the specified location with the given line thickness.
- Draws an oval in the specified bounding rectangle with the specified pen thickness.
- Draws a rectangle at the specified location with the supplied pen thickness.
- Draws a rounded rectangle at the specified location with the supplied pen thickness.
- Makes a solid 3D rectangle in the given color.
- Calls g.fillRect(left, top, width, height) after setting the color appropriately.
- Draws a solid rounded rectangle with the specified color.
- get Line Rectangle Intersection
- draw Round Rect Fade
- get Clip Rectangle
- Returns true if the first rectangle completely contains the second one.
- Returns true if the two specified rectangles intersect.
- Draw a focus rectangle on a graphics context.
- Create an affine transform given two rectangles. Or, alternatively, two points in the old basis and two corresponding points in the new one.
- fill Blurred Border Rect
- fill Blurred Glitch Rect
- fill Gradient Rect
- is Rectangle Displayable On Screen
- Clip the specified line to the given rectangle
- Draws a single-line highlight border rectangle.
- round Filled Rectangle
- round Rectangle
- Returns the point at which to draw a string so that it appears center-aligned within a given rectangle.
- Draws a 3d frame around the designated rectangle.
- Draws a 3d hightlight frame around the designated rectangle.
- grow Rectangle2D
- Indicates whether r1 is nearest to r2 in the clockwise (>0) or anti-clockwise (<0) direction.
- move Rectangle To Fit