|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcrystalspace.jbind.impl.csNativeObject
crystalspace.jbind.impl.csutil.scf.csBase
crystalspace.jbind.impl.video.graph2d.csGraphics2D
Field Summary |
Fields inherited from class crystalspace.jbind.impl.csNativeObject |
ImplFactory, nPointer |
Constructor Summary | |
csGraphics2D(iPointer nPointer)
|
Method Summary | |
void |
allowResize(boolean iAllow)
Enable/disable canvas resizing. |
boolean |
beginDraw()
This routine should be called before any draw operations. |
void |
blit(int x,
int y,
int width,
int height,
byte[] data)
Blit a memory block. |
void |
clear(int color)
Clear backbuffer. |
void |
clearAll(int color)
Clear all video pages. |
boolean |
clipLine(float x1,
float y1,
float x2,
float y2,
int xmin,
int ymin,
int xmax,
int ymax)
Clip a line against given rectangle. |
void |
close()
Close the device. |
iGraphics2D |
createOffscreenCanvas(iPointer memory,
int width,
int height,
int depth,
iOffscreenCanvasCallback ofscb)
Create an off-screen canvas so you can render on a given memory area. |
boolean |
doubleBuffer(boolean Enable)
Enable or disable double buffering; returns success status. |
void |
drawBox(int x,
int y,
int w,
int h,
int color)
Draw a box. |
void |
drawLine(float x1,
float y1,
float x2,
float y2,
int color)
Draw a line. |
void |
drawPixel(int x,
int y,
int color)
Draw a pixel. |
void |
drawPixels(csPixelCoord pixels,
int num_pixels,
int color)
Draw an array of pixel coordinates with the given color. |
int |
findRGB(int r,
int g,
int b)
Find an RGB color. |
void |
finishDraw()
This routine should be called when you finished drawing. |
void |
freeArea(csImageArea Area)
Free storage allocated for a subarea of screen. |
int[] |
getClipRect()
Retrieve clipping rectangle. |
boolean |
getDoubleBufferState()
Get the double buffer state. |
iFontServer |
getFontServer()
Get the active font server (does not do IncRef(););. |
boolean |
getFullScreen()
Returns 'true' if the program is being run full-screen. |
float |
getGamma()
Get gamma value. |
int |
getHeight()
Return the height of the framebuffer. |
static java.lang.Class |
getInterfaceClass()
|
static java.lang.String |
getInterfaceName()
|
static int |
getInterfaceVersion()
|
java.lang.String |
getName()
Return the name of the interface |
iNativeWindow |
getNativeWindow()
Get the native window corresponding with this canvas. |
int |
getPage()
Get active videopage number (starting from zero);. |
int |
getPalEntryCount()
Return the number of palette entries that can be modified. |
csRGBpixel |
getPalette()
Get the palette (if there is one);. |
byte[] |
getPixel(int x,
int y)
Query pixel R,G,B at given screen location. |
iPointer |
getPixelAt(int x,
int y)
Returns the address of the pixel at the specified (x, y); coordinates. |
int |
getPixelBytes()
Return the number of bytes for every pixel. |
csPixelFormat |
getPixelFormat()
Return information about the pixel format. |
int |
getVersion()
Return the version of the interface |
int |
getWidth()
Return the width of the framebuffer. |
static void |
initSCF()
|
protected boolean |
isNativePointerValidSafe()
|
boolean |
open()
Open the device. |
void |
print(csRect pArea)
Flip video pages (or dump backbuffer into framebuffer);. |
boolean |
resize(int w,
int h)
Resize the canvas. |
void |
restoreArea(csImageArea Area,
boolean Free)
Restore a subarea of screen saved with SaveArea();. |
csImageArea |
saveArea(int x,
int y,
int w,
int h)
Save a subarea of screen and return a handle to saved buffer. |
iImage |
screenShot()
Do a screenshot: return a new iImage object. |
void |
setClipRect(int nMinX,
int nMinY,
int nMaxX,
int nMaxY)
Set clipping rectangle. |
void |
setFullScreen(boolean b)
Change the fullscreen state of the canvas. |
boolean |
setGamma(float gamma)
Set gamma value (if supported by canvas);. |
boolean |
setMouseCursor(iImage image,
csRGBcolor keycolor)
Set mouse cursor using an image. |
boolean |
setMouseCursor(iImage image,
csRGBcolor keycolor,
int hotspot_x)
Set mouse cursor using an image. |
boolean |
setMouseCursor(iImage image,
csRGBcolor keycolor,
int hotspot_x,
int hotspot_y)
Set mouse cursor using an image. |
boolean |
setMouseCursor(iImage image,
csRGBcolor keycolor,
int hotspot_x,
int hotspot_y,
csRGBcolor fg)
Set mouse cursor using an image. |
boolean |
setMouseCursor(iImage image,
csRGBcolor keycolor,
int hotspot_x,
int hotspot_y,
csRGBcolor fg,
csRGBcolor bg)
Set mouse cursor using an image. |
boolean |
setMouseCursor(int iShape)
Set mouse cursor to one of predefined shape classes (see csmcXXX enum above);. |
boolean |
setMousePosition(int x,
int y)
Set mouse position (relative to top-left of CS window);. |
void |
setRGB(int i,
int r,
int g,
int b)
Set a color index to given R,G,B (0..255); values. |
void |
write(iFont font,
int x,
int y,
int fg,
int bg,
java.lang.String str)
Write a text string into the back buffer. |
void |
write(iFont font,
int x,
int y,
int fg,
int bg,
java.lang.String str,
int flags)
Write a text string into the back buffer. |
void |
writeBaseline(iFont font,
int x,
int y,
int fg,
int bg,
java.lang.String str)
Write a text string into the back buffer. |
Methods inherited from class crystalspace.jbind.impl.csutil.scf.csBase |
decRef, equals, finalize, getRefCount, incRef, nDelete, queryInterface, queryInterfaceSafe |
Methods inherited from class crystalspace.jbind.impl.csNativeObject |
changePointer, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, isNativePointerValidSafe, newNativeObject, setMemoryOwner, toString |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase |
decRef, getRefCount, incRef, queryInterface, queryInterfaceSafe |
Methods inherited from interface crystalspace.jbind.interfaces.iPointer |
changePointer, getPointer, isMemoryOwner, setMemoryOwner |
Constructor Detail |
public csGraphics2D(iPointer nPointer)
nPointer
- Method Detail |
public int getVersion()
iBase
getVersion
in interface iBase
getVersion
in class csBase
public java.lang.String getName()
iBase
getName
in interface iBase
getName
in class csBase
public static void initSCF()
public static int getInterfaceVersion()
public static java.lang.String getInterfaceName()
public static java.lang.Class getInterfaceClass()
public int getWidth()
iGraphics2D
getWidth
in interface iGraphics2D
public int getHeight()
iGraphics2D
getHeight
in interface iGraphics2D
protected boolean isNativePointerValidSafe()
public void allowResize(boolean iAllow)
iGraphics2D
allowResize
in interface iGraphics2D
iAllow
- iGraphics2D.allowResize(boolean)
public boolean beginDraw()
iGraphics2D
beginDraw
in interface iGraphics2D
iGraphics2D.beginDraw()
public void blit(int x, int y, int width, int height, byte[] data)
iGraphics2D
blit
in interface iGraphics2D
x
- y
- width
- height
- data
- iGraphics2D.blit(int, int, int, int, byte[])
public void clear(int color)
iGraphics2D
clear
in interface iGraphics2D
color
- iGraphics2D.clear(int)
public void clearAll(int color)
iGraphics2D
clearAll
in interface iGraphics2D
color
- iGraphics2D.clearAll(int)
public boolean clipLine(float x1, float y1, float x2, float y2, int xmin, int ymin, int xmax, int ymax)
iGraphics2D
clipLine
in interface iGraphics2D
x1
- y1
- x2
- y2
- xmin
- ymin
- xmax
- ymax
-
iGraphics2D.clipLine(float, float, float, float, int, int, int, int)
public void close()
iGraphics2D
close
in interface iGraphics2D
iGraphics2D.close()
public iGraphics2D createOffscreenCanvas(iPointer memory, int width, int height, int depth, iOffscreenCanvasCallback ofscb)
iGraphics2D
createOffscreenCanvas
in interface iGraphics2D
memory
- width
- height
- depth
- ofscb
-
iGraphics2D.createOffscreenCanvas(crystalspace.jbind.interfaces.iPointer, int, int, int, crystalspace.jbind.interfaces.ivideo.graph2d.iOffscreenCanvasCallback)
public boolean doubleBuffer(boolean Enable)
iGraphics2D
doubleBuffer
in interface iGraphics2D
Enable
-
iGraphics2D.doubleBuffer(boolean)
public void drawBox(int x, int y, int w, int h, int color)
iGraphics2D
drawBox
in interface iGraphics2D
x
- y
- w
- h
- color
- iGraphics2D.drawBox(int, int, int, int, int)
public void drawLine(float x1, float y1, float x2, float y2, int color)
iGraphics2D
drawLine
in interface iGraphics2D
x1
- y1
- x2
- y2
- color
- iGraphics2D.drawLine(float, float, float, float, int)
public void drawPixel(int x, int y, int color)
iGraphics2D
drawPixel
in interface iGraphics2D
x
- y
- color
- iGraphics2D.drawPixel(int, int, int)
public void drawPixels(csPixelCoord pixels, int num_pixels, int color)
iGraphics2D
drawPixels
in interface iGraphics2D
pixels
- num_pixels
- color
- iGraphics2D.drawPixels(crystalspace.jbind.impl.video.graph2d.csPixelCoord, int, int)
public int findRGB(int r, int g, int b)
iGraphics2D
findRGB
in interface iGraphics2D
r
- g
- b
-
iGraphics2D.findRGB(int, int, int)
public void finishDraw()
iGraphics2D
finishDraw
in interface iGraphics2D
iGraphics2D.finishDraw()
public void freeArea(csImageArea Area)
iGraphics2D
freeArea
in interface iGraphics2D
Area
- iGraphics2D.freeArea(crystalspace.jbind.impl.video.graph2d.csImageArea)
public int[] getClipRect()
iGraphics2D
getClipRect
in interface iGraphics2D
iGraphics2D.getClipRect()
public boolean getDoubleBufferState()
iGraphics2D
getDoubleBufferState
in interface iGraphics2D
iGraphics2D.getDoubleBufferState()
public iFontServer getFontServer()
iGraphics2D
getFontServer
in interface iGraphics2D
iGraphics2D.getFontServer()
public boolean getFullScreen()
iGraphics2D
getFullScreen
in interface iGraphics2D
iGraphics2D.getFullScreen()
public float getGamma()
iGraphics2D
getGamma
in interface iGraphics2D
iGraphics2D.getGamma()
public iNativeWindow getNativeWindow()
iGraphics2D
getNativeWindow
in interface iGraphics2D
iGraphics2D.getNativeWindow()
public int getPage()
iGraphics2D
getPage
in interface iGraphics2D
iGraphics2D.getPage()
public int getPalEntryCount()
iGraphics2D
getPalEntryCount
in interface iGraphics2D
iGraphics2D.getPalEntryCount()
public csRGBpixel getPalette()
iGraphics2D
getPalette
in interface iGraphics2D
iGraphics2D.getPalette()
public byte[] getPixel(int x, int y)
iGraphics2D
getPixel
in interface iGraphics2D
x
- y
-
iGraphics2D.getPixel(int, int)
public iPointer getPixelAt(int x, int y)
iGraphics2D
getPixelAt
in interface iGraphics2D
x
- y
-
iGraphics2D.getPixelAt(int, int)
public int getPixelBytes()
iGraphics2D
getPixelBytes
in interface iGraphics2D
iGraphics2D.getPixelBytes()
public csPixelFormat getPixelFormat()
iGraphics2D
getPixelFormat
in interface iGraphics2D
iGraphics2D.getPixelFormat()
public boolean open()
iGraphics2D
open
in interface iGraphics2D
iGraphics2D.open()
public void print(csRect pArea)
iGraphics2D
print
in interface iGraphics2D
pArea
- iGraphics2D.print(crystalspace.jbind.impl.csgeom.csrect.csRect)
public boolean resize(int w, int h)
iGraphics2D
resize
in interface iGraphics2D
w
- h
-
iGraphics2D.resize(int, int)
public void restoreArea(csImageArea Area, boolean Free)
iGraphics2D
restoreArea
in interface iGraphics2D
Area
- Free
- iGraphics2D.restoreArea(crystalspace.jbind.impl.video.graph2d.csImageArea, boolean)
public csImageArea saveArea(int x, int y, int w, int h)
iGraphics2D
saveArea
in interface iGraphics2D
x
- y
- w
- h
-
iGraphics2D.saveArea(int, int, int, int)
public iImage screenShot()
iGraphics2D
screenShot
in interface iGraphics2D
iGraphics2D.screenShot()
public void setClipRect(int nMinX, int nMinY, int nMaxX, int nMaxY)
iGraphics2D
setClipRect
in interface iGraphics2D
nMinX
- nMinY
- nMaxX
- nMaxY
- iGraphics2D.setClipRect(int, int, int, int)
public void setFullScreen(boolean b)
iGraphics2D
setFullScreen
in interface iGraphics2D
b
- iGraphics2D.setFullScreen(boolean)
public boolean setGamma(float gamma)
iGraphics2D
setGamma
in interface iGraphics2D
gamma
-
iGraphics2D.setGamma(float)
public boolean setMouseCursor(iImage image, csRGBcolor keycolor, int hotspot_x, int hotspot_y, csRGBcolor fg, csRGBcolor bg)
iGraphics2D
setMouseCursor
in interface iGraphics2D
image
- keycolor
- hotspot_x
- hotspot_y
- fg
- bg
-
iGraphics2D.setMouseCursor(crystalspace.jbind.interfaces.igraphic.image.iImage, crystalspace.jbind.impl.csgfx.rgbpixel.csRGBcolor, int, int, crystalspace.jbind.impl.csgfx.rgbpixel.csRGBcolor, crystalspace.jbind.impl.csgfx.rgbpixel.csRGBcolor)
public boolean setMouseCursor(iImage image, csRGBcolor keycolor, int hotspot_x, int hotspot_y, csRGBcolor fg)
iGraphics2D
setMouseCursor
in interface iGraphics2D
image
- keycolor
- hotspot_x
- hotspot_y
- fg
-
iGraphics2D.setMouseCursor(crystalspace.jbind.interfaces.igraphic.image.iImage, crystalspace.jbind.impl.csgfx.rgbpixel.csRGBcolor, int, int, crystalspace.jbind.impl.csgfx.rgbpixel.csRGBcolor)
public boolean setMouseCursor(iImage image, csRGBcolor keycolor, int hotspot_x, int hotspot_y)
iGraphics2D
setMouseCursor
in interface iGraphics2D
image
- keycolor
- hotspot_x
- hotspot_y
-
iGraphics2D.setMouseCursor(crystalspace.jbind.interfaces.igraphic.image.iImage, crystalspace.jbind.impl.csgfx.rgbpixel.csRGBcolor, int, int)
public boolean setMouseCursor(iImage image, csRGBcolor keycolor, int hotspot_x)
iGraphics2D
setMouseCursor
in interface iGraphics2D
image
- keycolor
- hotspot_x
-
iGraphics2D.setMouseCursor(crystalspace.jbind.interfaces.igraphic.image.iImage, crystalspace.jbind.impl.csgfx.rgbpixel.csRGBcolor, int)
public boolean setMouseCursor(iImage image, csRGBcolor keycolor)
iGraphics2D
setMouseCursor
in interface iGraphics2D
image
- keycolor
-
iGraphics2D.setMouseCursor(crystalspace.jbind.interfaces.igraphic.image.iImage, crystalspace.jbind.impl.csgfx.rgbpixel.csRGBcolor)
public boolean setMouseCursor(int iShape)
iGraphics2D
setMouseCursor
in interface iGraphics2D
iShape
-
iGraphics2D.setMouseCursor(int)
public boolean setMousePosition(int x, int y)
iGraphics2D
setMousePosition
in interface iGraphics2D
x
- y
-
iGraphics2D.setMousePosition(int, int)
public void setRGB(int i, int r, int g, int b)
iGraphics2D
setRGB
in interface iGraphics2D
i
- r
- g
- b
- iGraphics2D.setRGB(int, int, int, int)
public void write(iFont font, int x, int y, int fg, int bg, java.lang.String str, int flags)
iGraphics2D
write
in interface iGraphics2D
font
- x
- y
- fg
- bg
- str
- flags
- iGraphics2D.write(crystalspace.jbind.interfaces.ivideo.fontserv.iFont, int, int, int, int, java.lang.String, int)
public void write(iFont font, int x, int y, int fg, int bg, java.lang.String str)
iGraphics2D
write
in interface iGraphics2D
font
- x
- y
- fg
- bg
- str
- iGraphics2D.write(crystalspace.jbind.interfaces.ivideo.fontserv.iFont, int, int, int, int, java.lang.String)
public void writeBaseline(iFont font, int x, int y, int fg, int bg, java.lang.String str)
iGraphics2D
writeBaseline
in interface iGraphics2D
font
- x
- y
- fg
- bg
- str
- iGraphics2D.writeBaseline(crystalspace.jbind.interfaces.ivideo.fontserv.iFont, int, int, int, int, java.lang.String)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |