|
|||||||||
| 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.BytePageMapper
Page mapper extension mapping byte-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 BytePageFrame[] |
pageFrames
array of page frames |
protected int |
pageHeight
individual page dimensions |
protected int |
pageWidth
individual page dimensions |
protected static int |
SIZEOF_BYTE
size in bytes of a java "byte" |
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 | |
BytePageMapper(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. |
byte |
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,
byte[] buffer,
int offset,
int scansize)
Load a rectangular area of data into a memory buffer. |
void |
setPixel(int x,
int y,
byte value)
Set a single value at a specified logical location. |
void |
setRectangle(int x,
int y,
int width,
int height,
byte[] 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_BYTE
protected BytePageFrame[] pageFrames
protected int width
protected int height
protected int pageWidth
protected int pageHeight
protected int widthInPages
protected int heightInPages
| Constructor Detail |
public BytePageMapper(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 frames| Method Detail |
public byte getPixel(int x,
int y)
throws java.io.IOException
x - the x-coordinatey - the y-coordinate
public void setPixel(int x,
int y,
byte value)
throws java.io.IOException
x - the x-coordinatey - the y-coordinatevalue - the value for the location
public void getRectangle(int x,
int y,
int width,
int height,
byte[] 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 at
public void setRectangle(int x,
int y,
int width,
int height,
byte[] 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 at
public 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 | ||||||||