Examples of glColor4f()


Examples of javax.media.opengl.GL.glColor4f()

            gl.glVertex2f(p.x, p.y);
       
            p = t.getPoint(1);
        c = t.getColor(1);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
            gl.glVertex2f(p.x, p.y);
       
            p = t.getPoint(2);
        c = t.getColor(2);
        if(c == null) c = color;
View Full Code Here

Examples of javax.media.opengl.GL.glColor4f()

            gl.glVertex2f(p.x, p.y);
       
            p = t.getPoint(2);
        c = t.getColor(2);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
            gl.glVertex2f(p.x, p.y);
      }
      // reset color;
      applyColor();
    } else {
View Full Code Here

Examples of javax.media.opengl.GL.glColor4f()

        if (tc3 == null) throw new IllegalArgumentException("Texture coordinate for triangle must not be null");
   
        p = t.getPoint(0);
        c = t.getColor(0);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
        float texX = coords.left() + (coords.right() - coords.left()) / joglImage.texture.getImageWidth() * tc1.x;
        float texY = coords.top() + (coords.bottom() - coords.top()) / joglImage.texture.getImageHeight() * tc1.y;
        gl.glTexCoord2f(texX, texY);
            gl.glVertex2f(p.x, p.y);
       
View Full Code Here

Examples of javax.media.opengl.GL.glColor4f()

            gl.glVertex2f(p.x, p.y);
       
            p = t.getPoint(1);
        c = t.getColor(1);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
        texX = coords.left() + (coords.right() - coords.left()) / joglImage.texture.getImageWidth() * tc2.x;
        texY = coords.top() + (coords.bottom() - coords.top()) / joglImage.texture.getImageHeight() * tc2.y;
        gl.glTexCoord2f(texX, texY);
            gl.glVertex2f(p.x, p.y);
       
View Full Code Here

Examples of javax.media.opengl.GL.glColor4f()

            gl.glVertex2f(p.x, p.y);
       
            p = t.getPoint(2);
        c = t.getColor(2);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
        texX = coords.left() + (coords.right() - coords.left()) / joglImage.texture.getImageWidth() * tc3.x;
        texY = coords.top() + (coords.bottom() - coords.top()) / joglImage.texture.getImageHeight() * tc3.y;
        gl.glTexCoord2f(texX, texY);
            gl.glVertex2f(p.x, p.y);
   
View Full Code Here

Examples of javax.media.opengl.GL2.glColor4f()

        if (this.getPressedMaskTexture() == texture)
        {
            GL2 gl = dc.getGL().getGL2(); // GL initialization checks for GL2 compatibility.
            gl.glEnable(GL.GL_BLEND);
            gl.glBlendFunc(GL.GL_ZERO, GL.GL_SRC_COLOR);
            gl.glColor4f(1f, 1f, 1f, 1f);
        }
    }

    @SuppressWarnings({"UnusedDeclaration"})
    protected void doDrawPressedMask(DrawContext dc, int width, int height, double opacity, Position pickPosition)
View Full Code Here

Examples of javax.media.opengl.GL2.glColor4f()

    property.shape.setScale(property.size,
        property.size * property.ratio, property.size);

    // fill the shape
    if (property.isFilled) {
      gl.glColor4f(property.fillColor.getRed() / 255f,
          property.fillColor.getGreen() / 255f,
          property.fillColor.getBlue() / 255f,
          property.fillColor.getAlpha() / 255f);
      property.shape.fill(gl);
    }
View Full Code Here

Examples of javax.media.opengl.GL2.glColor4f()

    }

    // draw the border
    if (property.strokeWidth > 0.0f) {
      gl.glLineWidth(property.strokeWidth);
      gl.glColor4f(property.strokeColor.getRed() / 255f,
          property.strokeColor.getGreen() / 255f,
          property.strokeColor.getBlue() / 255f,
          property.strokeColor.getAlpha() / 255f);
      property.shape.draw(gl);
    }
View Full Code Here

Examples of javax.media.opengl.GL2.glColor4f()

      double centerX = property.positionX+property.size/2;
      double centerY = property.positionY+property.size/2;
      double halfWidth = 0.7;
      double halfHeight = 4;
      gl.glBegin(GL2.GL_QUADS);
      gl.glColor4f(1f, 1f, 1f, 0.5f);
      // vertical line
      gl.glVertex2d(centerX - halfWidth, centerY + halfHeight);
      gl.glVertex2d(centerX + halfWidth, centerY + halfHeight);
      gl.glVertex2d(centerX + halfWidth, centerY - halfHeight);
      gl.glVertex2d(centerX - halfWidth, centerY - halfHeight);
View Full Code Here

Examples of javax.media.opengl.GL2.glColor4f()

    }
    GL2 gl = scene.gl;
    gl.glPushName(property.shapeId);
    if (property.strokeWidth > 0.0f) {
      gl.glLineWidth(property.strokeWidth);
      gl.glColor4f(property.strokeColor.getRed() / 255f,
          property.strokeColor.getGreen() / 255f,
          property.strokeColor.getBlue() / 255f,
          property.strokeColor.getAlpha() / 255f);

      // get the real endpoints for the edge. Necessary to have the
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.