|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.jimi.core.vmem.PageMapper | +--com.sun.jimi.core.vmem.IntPageMapper
Page mapper extension mapping int-based rectangle and pixel operations onto page-sized operations which are performed through page frames.
Field Summary | |
protected int |
height
logical dimensions |
protected int |
heightInPages
dimensions measured in pages rather than pixels |
protected IntPageFrame[] |
pageFrames
array of page frames |
protected int |
pageHeight
individual page dimensions |
protected int |
pageWidth
individual page dimensions |
protected static int |
SIZEOF_INT
size in bytes of a java "int" |
protected int |
width
logical dimensions |
protected int |
widthInPages
dimensions measured in pages rather than pixels |
Fields inherited from class com.sun.jimi.core.vmem.PageMapper |
input,
logicalSize,
numberOfPageFrames,
output,
pageDimensions,
pageFaults,
pageFrameMemory,
storage |
Constructor Summary | |
IntPageMapper(RandomAccessStorage storage,
java.awt.Dimension logicalDimensions,
int pageFrameMemory)
Create an page mapper with specified page frame size and count. |
Method Summary | |
int |
getLogicalPageNumberForLocation(int x,
int y)
Find out which logical page contains a given point. |
java.awt.Dimension |
getPageDimensions()
|
PageFrame[] |
getPageFrames()
Get the page frames being used for buffering. |
int |
getPageSize()
Get the size in bytes of a page. |
int |
getPixel(int x,
int y)
Get a pixel value at a specified logical location. |
protected int |
getPixelSize()
|
void |
getRectangle(int x,
int y,
int width,
int height,
int[] buffer,
int offset,
int scansize)
Load a rectangular area of data into a memory buffer. |
void |
setChannelRectangle(int channel,
int x,
int y,
int width,
int height,
byte[] buffer,
int offset,
int scansize)
Load a rectangular area of data into a memory buffer. |
void |
setPixel(int x,
int y,
int value)
Set a single value at a specified logical location. |
void |
setRectangle(int x,
int y,
int width,
int height,
int[] buffer,
int offset,
int scansize)
Load a rectangular area of data into a memory buffer. |
Methods inherited from class com.sun.jimi.core.vmem.PageMapper |
commitPage,
configurePageFrames,
getLogicalSize,
getPageFrame,
getPageFrameForReading,
getPageFrameForWriting,
howManyPageFaults,
readPageIntoFrame,
resetPageFaultCount |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static final int SIZEOF_INT
protected IntPageFrame[] pageFrames
protected int width
protected int height
protected int pageWidth
protected int pageHeight
protected int widthInPages
protected int heightInPages
Constructor Detail |
public IntPageMapper(RandomAccessStorage storage, java.awt.Dimension logicalDimensions, int pageFrameMemory)
width
- the width of the logical spaceheight
- the height of the logical spacepageWidth
- the width of each page framepageHeight
- the height of each page framenumberOfFrames
- the number of page framesMethod Detail |
public int getPixel(int x, int y) throws java.io.IOException
x
- the x-coordinatey
- the y-coordinatepublic void setPixel(int x, int y, int value) throws java.io.IOException
x
- the x-coordinatey
- the y-coordinatevalue
- the value for the locationpublic void getRectangle(int x, int y, int width, int height, int[] buffer, int offset, int scansize) throws java.io.IOException
x
- the logical x-coordinatey
- the logical y-coordinatewidth
- the logical widthheight
- the logical heightbuffer
- the buffer to copy intooffset
- the index in the buffer to start copying atpublic void setRectangle(int x, int y, int width, int height, int[] buffer, int offset, int scansize) throws java.io.IOException
x
- the logical x-coordinatey
- the logical y-coordinatewidth
- the logical widthheight
- the logical heightbuffer
- the buffer to copy intooffset
- the index in the buffer to start copying atpublic void setChannelRectangle(int channel, int x, int y, int width, int height, byte[] buffer, int offset, int scansize) throws java.io.IOException
channel
- which channel of data to setx
- the logical x-coordinatey
- the logical y-coordinatewidth
- the logical widthheight
- the logical heightbuffer
- the buffer to copy intooffset
- the index in the buffer to start copying atpublic int getLogicalPageNumberForLocation(int x, int y)
public int getPageSize()
protected int getPixelSize()
public PageFrame[] getPageFrames()
public java.awt.Dimension getPageDimensions()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |