Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.wpi.first.wpilibj.image
Class NIVision.Rect

    java.lang.Object
      com.sun.cldc.jna.Structure
          edu.wpi.first.wpilibj.image.NIVision.Rect

Enclosing class:
  NIVision

    public static class NIVision.Rect

extends Structure

Field Summary

Fields inherited from class com.sun.cldc.jna.Structure
`backingNativeMemory, NULL`

Constructor Summary
`NIVision.Rect(int top, int left, int height, int width)` Create a new Rect with the specified dimensions

Method Summary
`void` | `free()` Free the memory used by this range
`int` | `getHeight()` Get the height of the rectangle
`int` | `getLeft()` Get the left edge of the rectangle
`int` | `getTop()` Get the top of the rectangle
`int` | `getWidth()` Get the width of the rectangle
`void` | `read()` Copy the fields of the struct from native memory to the Java fields
`void` | `set(int top, int left, int height, int width)` Set the Rect dimensions
`int` | `size()`
`void` | `write()` Copy the java fields of the struct to native memory from the Java fields

Methods inherited from class com.sun.cldc.jna.Structure
`allocateMemory, allocateMemory, clear, freeMemory, getPointer, release, toString, useMemory`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### NIVision.Rect

    public NIVision.Rect(int top,
                         int left,
                         int height,
                         int width)

  Create a new Rect with the specified dimensions

  Parameters:
    `top` - The top of the rectangle
    `left` - The left edge of the rectangle
    `height` - The height of the rectangle
    `width` - The width of the rectangle

Method Detail

### read

    public void read()

  Description copied from class: `Structure`
  Copy the fields of the struct from native memory to the Java fields

  Specified by:
    `read` in class `Structure`

### write

    public void write()

  Description copied from class: `Structure`
  Copy the java fields of the struct to native memory from the Java fields

  Specified by:
    `write` in class `Structure`

### size

    public int size()

  Specified by:
    `size` in class `Structure`
  Returns:
    the size of the native structure

### free

    public void free()

  Free the memory used by this range

### set

    public void set(int top,
                    int left,
                    int height,
                    int width)

  Set the Rect dimensions

  Parameters:
    `top` - The top of the rectangle
    `left` - The left edge of the rectangle
    `height` - The height of the rectangle
    `width` - The width of the rectangle

### getTop

    public int getTop()

  Get the top of the rectangle

  Returns:
    The top edge of the rectangle in pixels, measured from the top of the image

### getLeft

    public int getLeft()

  Get the left edge of the rectangle

  Returns:
    The left edge of the rectangle in pixels measured from the left of the image

### getWidth

    public int getWidth()

  Get the width of the rectangle

  Returns:
    The width of the rectangle in pixels

### getHeight

    public int getHeight()

  Get the height of the rectangle

  Returns:
    The height edge of the rectangle in pixels

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"