org.stellarium.ui.components
Class Scissor

java.lang.Object
  extended by org.stellarium.ui.components.Scissor

public class Scissor
extends java.lang.Object

Manages the use of the OpenGL Scissor test to prevent drawings outside the components borders. Use a stack like for openGL matrices.


Field Summary
static Painter defaultPainter
           
static SColor S_WHITE
           
static Scissor scissor
           
private  java.util.LinkedList<SSquare> stack
           
private  int winH
           
private  int winW
           
 
Constructor Summary
Scissor(int someWinW, int someWinH)
           
 
Method Summary
 void activate()
           
 void desactivate()
           
 void pop()
          Remove the last element in the stack : ie comes back to the previous GlScissor borders.
 void push(int posX, int posY, int sizeX, int sizeY)
          Define a new GlScissor zone relative to the previous one and apply it so that nothing can be drawn outside the limits
 void push(Vector2i pos, Vector2i size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

S_WHITE

public static final SColor S_WHITE

scissor

public static Scissor scissor

defaultPainter

public static Painter defaultPainter

winW

private int winW

winH

private int winH

stack

private java.util.LinkedList<SSquare> stack
Constructor Detail

Scissor

public Scissor(int someWinW,
               int someWinH)
Method Detail

push

public void push(int posX,
                 int posY,
                 int sizeX,
                 int sizeY)
Define a new GlScissor zone relative to the previous one and apply it so that nothing can be drawn outside the limits


push

public void push(Vector2i pos,
                 Vector2i size)

pop

public void pop()
Remove the last element in the stack : ie comes back to the previous GlScissor borders.


activate

public void activate()

desactivate

public void desactivate()