public void setStrokeAlpha(int strokeAlpha) { this.strokeAlpha = strokeAlpha; if (canvas != null) { setStrokeColorFromCache(); } }
public void setStrokeAlpha(int strokeAlpha) { this.strokeAlpha = strokeAlpha; setStrokeColorFromCache(); }
/** * Sets the stroke color from a Color3f * * @param color color where (r,g,b) = (x,y,z) */ private void setStrokeColor(Color3f color) { if (cacheStrokeR == color.x && cacheStrokeG == color.y && cacheStrokeB == color.z) { // no need to re-set the stroke color, just use the cached values } else { cacheStrokeR = color.x; cacheStrokeG = color.y; cacheStrokeB = color.z; setStrokeColorFromCache(); } }
/** * Sets the stroke color from a Color3f * * @param color color where (r,g,b) = (x,y,z) */ private void setStrokeColor(Color3f color) { if (cacheStrokeR == color.x && cacheStrokeG == color.y && cacheStrokeB == color.z) { // no need to re-set the stroke color, just use the cached values } else { cacheStrokeR = color.x; cacheStrokeG = color.y; cacheStrokeB = color.z; setStrokeColorFromCache(); } }
public void setCanvas(CanvasImage image) { this.canvas = image.canvas(); canvas.setStrokeWidth(strokeWidth); setStrokeColorFromCache(); setFillColorFromCache(); }
public DebugDrawBox2D(Platform plat, float width, float height) { super(new OBBViewportTransform()); this.plat = plat; viewportTransform.setYFlip(true); strokeWidth = 1.0f; strokeAlpha = 255; fillAlpha = 150; canvas = plat.graphics().createCanvas(width, height); canvas.setStrokeWidth(strokeWidth); setStrokeColorFromCache(); setFillColorFromCache(); }