de.cau.cs.kieler.kiml.util
Interface IDebugCanvas

All Known Implementing Classes:
DebugCanvas

public interface IDebugCanvas

Interface for debug canvas.

Rating proposed yellow
(2011-01-13) msp

Nested Class Summary
static class IDebugCanvas.Color
          color definitions.
 
Method Summary
 void clear()
          Clears the canvas and the figure buffer.
 void drawBuffer()
          Draws the buffered figures and clears the buffer.
 void drawCircle(float x, float y, float d, IDebugCanvas.Color color)
          Draws a non-filled circle on the canvas.
 void drawEllipse(float x, float y, float w, float h, IDebugCanvas.Color color)
          Draws a non-filled ellipse on the canvas.
 void drawFilledCircle(float x, float y, float d, IDebugCanvas.Color color)
          Draws a filled circle on the canvas.
 void drawFilledEllipse(float x, float y, float w, float h, IDebugCanvas.Color color)
          Draws a filled ellipse on the canvas.
 void drawFilledRectangle(float x, float y, float w, float h, IDebugCanvas.Color color)
          Draws a filled rectangle on the canvas.
 void drawLine(float x1, float y1, float x2, float y2, IDebugCanvas.Color color)
          Draws a line on the canvas.
 void drawRectangle(float x, float y, float w, float h, IDebugCanvas.Color color)
          Draws a non-filled rectangle one the canvas.
 void drawString(String string, float x, float y, IDebugCanvas.Color color)
          Draws a string on the canvas.
 void setBuffered(boolean buffered)
          Sets the canvas to buffered mode or non-buffered mode.
 void setOffset(KNode parentNode, float addx, float addy)
          Sets an offset for this canvas.
 

Method Detail

setOffset

void setOffset(KNode parentNode,
               float addx,
               float addy)
Sets an offset for this canvas.

Parameters:
parentNode - the parent node that defines the current offset
addx - additional horizontal offset
addy - additional vertical offset

drawFilledRectangle

void drawFilledRectangle(float x,
                         float y,
                         float w,
                         float h,
                         IDebugCanvas.Color color)
Draws a filled rectangle on the canvas.

Parameters:
x - the x-coordinate
y - the y-coordinate
w - the width
h - the height
color - the color

drawRectangle

void drawRectangle(float x,
                   float y,
                   float w,
                   float h,
                   IDebugCanvas.Color color)
Draws a non-filled rectangle one the canvas.

Parameters:
x - the x-coordinate
y - the y-coordinate
w - the width
h - the height
color - the color

drawFilledEllipse

void drawFilledEllipse(float x,
                       float y,
                       float w,
                       float h,
                       IDebugCanvas.Color color)
Draws a filled ellipse on the canvas.

Parameters:
x - the x-coordinate
y - the y-coordinate
w - the width
h - the height
color - the color

drawEllipse

void drawEllipse(float x,
                 float y,
                 float w,
                 float h,
                 IDebugCanvas.Color color)
Draws a non-filled ellipse on the canvas.

Parameters:
x - the x-coordinate
y - the y-coordinate
w - the width
h - the height
color - the color

drawFilledCircle

void drawFilledCircle(float x,
                      float y,
                      float d,
                      IDebugCanvas.Color color)
Draws a filled circle on the canvas.

Parameters:
x - the x-coordinate
y - the y-coordinate
d - the diameter
color - the color

drawCircle

void drawCircle(float x,
                float y,
                float d,
                IDebugCanvas.Color color)
Draws a non-filled circle on the canvas.

Parameters:
x - the x-coordinate
y - the y-coordinate
d - the diameter
color - the color

drawLine

void drawLine(float x1,
              float y1,
              float x2,
              float y2,
              IDebugCanvas.Color color)
Draws a line on the canvas.

Parameters:
x1 - the x-coordinate of the start point
y1 - the y-coordinate of the start point
x2 - the x-coordinate of the end point
y2 - the y-coordinate of the end point
color - the color

drawString

void drawString(String string,
                float x,
                float y,
                IDebugCanvas.Color color)
Draws a string on the canvas.

Parameters:
string - the string
x - the x-coordinate
y - the y-coordinate
color - the color

clear

void clear()
Clears the canvas and the figure buffer.


setBuffered

void setBuffered(boolean buffered)
Sets the canvas to buffered mode or non-buffered mode.

Parameters:
buffered - whether buffered mode shall be active

drawBuffer

void drawBuffer()
Draws the buffered figures and clears the buffer. This has only an effect if the canvas is set to buffered.