当前位置: 首页>>代码示例>>Java>>正文


Java GraphicsUtils.fillPaintedShape方法代码示例

本文整理汇总了Java中de.erichseifert.gral.util.GraphicsUtils.fillPaintedShape方法的典型用法代码示例。如果您正苦于以下问题:Java GraphicsUtils.fillPaintedShape方法的具体用法?Java GraphicsUtils.fillPaintedShape怎么用?Java GraphicsUtils.fillPaintedShape使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在de.erichseifert.gral.util.GraphicsUtils的用法示例。


在下文中一共展示了GraphicsUtils.fillPaintedShape方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getArea

import de.erichseifert.gral.util.GraphicsUtils; //导入方法依赖的package包/类
/**
 * Returns the graphical representation to be drawn for the specified
 * data points.
 * @param points Points to be used for creating the area.
 * @param shape Geometric shape of the area.
 * @return Representation of the area.
 */
public Drawable getArea(final List<DataPoint> points, final Shape shape) {
	return new AbstractDrawable() {
		/** Version id for serialization. */
		private static final long serialVersionUID = -3659798228877496727L;

		/**
		 * Draws the {@code Drawable} with the specified drawing context.
		 * @param context Environment used for drawing
		 */
		public void draw(DrawingContext context) {
			Paint paint = DefaultAreaRenderer2D.this.getColor();
			GraphicsUtils.fillPaintedShape(context.getGraphics(),
				shape, paint, null);
		}
	};
}
 
开发者ID:eseifert,项目名称:gral,代码行数:24,代码来源:DefaultAreaRenderer2D.java

示例2: getArea

import de.erichseifert.gral.util.GraphicsUtils; //导入方法依赖的package包/类
/**
 * Returns the graphical representation to be drawn for the specified data
 * points.
 * @param points Points that define the shape of the area.
 * @param shape Geometric shape of the area.
 * @return Representation of the area.
 */
public Drawable getArea(final List<DataPoint> points, final Shape shape) {
	return new AbstractDrawable() {
		/** Version id for serialization. */
		private static final long serialVersionUID = 5492321759151727458L;

		/**
		 * Draws the {@code Drawable} with the specified drawing context.
		 * @param context Environment used for drawing
		 */
		public void draw(DrawingContext context) {
			Paint paint = LineAreaRenderer2D.this.getColor();
			GraphicsUtils.fillPaintedShape(context.getGraphics(),
				shape, paint, null);
		}
	};
}
 
开发者ID:eseifert,项目名称:gral,代码行数:24,代码来源:LineAreaRenderer2D.java

示例3: draw

import de.erichseifert.gral.util.GraphicsUtils; //导入方法依赖的package包/类
/**
 * Draws the {@code Drawable} with the specified drawing context.
 * @param context Environment used for drawing
 */
@Override
public void draw(DrawingContext context) {
	Graphics2D graphics = context.getGraphics();

	Paint bg = getBackground();
	if (bg != null) {
		GraphicsUtils.fillPaintedShape(graphics, getBounds(), bg, null);
	}

	Stroke stroke = getBorderStroke();
	if (stroke != null) {
		Paint fg = getBorderColor();
		GraphicsUtils.drawPaintedShape(
				graphics, getBounds(), fg, null, stroke);
	}

	drawComponents(context);
}
 
开发者ID:eseifert,项目名称:gral,代码行数:23,代码来源:AbstractPlot.java

示例4: getLine

import de.erichseifert.gral.util.GraphicsUtils; //导入方法依赖的package包/类
/**
 * Returns a graphical representation for the line defined by
 * {@code e points}.
 * @param points Points used for creating the line.
 * @param shape Geometric shape for this line.
 * @return Representation of the line.
 */
public Drawable getLine(final List<DataPoint> points, final Shape shape) {
	return new AbstractDrawable() {
		/** Version id for serialization. */
		private static final long serialVersionUID1 = 7995515716470892483L;

		/**
		 * Draws the {@code Drawable} with the specified drawing context.
		 * @param context Environment used for drawing
		 */
		public void draw(DrawingContext context) {
			// Draw line
			Paint paint = DefaultLineRenderer2D.this.getColor();
			GraphicsUtils.fillPaintedShape(
				context.getGraphics(), shape, paint, null);
		}
	};
}
 
开发者ID:eseifert,项目名称:gral,代码行数:25,代码来源:DefaultLineRenderer2D.java

示例5: getLine

import de.erichseifert.gral.util.GraphicsUtils; //导入方法依赖的package包/类
/**
 * Returns a graphical representation for the line defined by
 * {@code points}.
 * @param points Points to be used for creating the line.
 * @param shape Geometric shape for this line.
 * @return Representation of the line.
 */
public Drawable getLine(final List<DataPoint> points, final Shape shape) {
	return new AbstractDrawable() {
		/** Version id for serialization. */
		private static final long serialVersionUID1 = 3641589240264518755L;

		/**
		 * Draws the {@code Drawable} with the specified drawing context.
		 * @param context Environment used for drawing
		 */
		public void draw(DrawingContext context) {
			// Draw path
			Paint paint = SmoothLineRenderer2D.this.getColor();
			GraphicsUtils.fillPaintedShape(
				context.getGraphics(), shape, paint, null);
		}
	};
}
 
开发者ID:eseifert,项目名称:gral,代码行数:25,代码来源:SmoothLineRenderer2D.java

示例6: getLine

import de.erichseifert.gral.util.GraphicsUtils; //导入方法依赖的package包/类
/**
 * Returns a graphical representation for the line defined by
 * {@code points}.
 * @param points Points to be used for creating the line.
 * @param shape Geometric shape for this line.
 * @return Representation of the line.
 */
public Drawable getLine(final List<DataPoint> points, final Shape shape) {
	return new AbstractDrawable() {
		/** Version id for serialization. */
		private static final long serialVersionUID1 = -1686744943386843195L;

		/**
		 * Draws the {@code Drawable} with the specified drawing context.
		 * @param context Environment used for drawing
		 */
		public void draw(DrawingContext context) {
			// Draw path
			Paint paint = DiscreteLineRenderer2D.this.getColor();
			GraphicsUtils.fillPaintedShape(
				context.getGraphics(), shape, paint, null);
		}
	};
}
 
开发者ID:eseifert,项目名称:gral,代码行数:25,代码来源:DiscreteLineRenderer2D.java

示例7: getArea

import de.erichseifert.gral.util.GraphicsUtils; //导入方法依赖的package包/类
/**
 * Returns the graphical representation to be drawn for the specified
 * data points.
 * @param points Points to be used for creating the area.
 * @param shape Geometric shape of the area.
 * @return Representation of the area.
 */
public Drawable getArea(final List<DataPoint> points, final Shape shape) {
	return new AbstractDrawable() {
		/** Version id for serialization. */
		private static final long serialVersionUID = -3659798228877496727L;

		/**
		 * Draws the {@code Drawable} with the specified drawing context.
		 * @param context Environment used for drawing
		 */
		public void draw(DrawingContext context) {
			Paint paint = DefaultAreaRenderer2D.this.getSetting(COLOR);
			GraphicsUtils.fillPaintedShape(context.getGraphics(),
				shape, paint, null);
		}
	};
}
 
开发者ID:charles-cooper,项目名称:idylfin,代码行数:24,代码来源:DefaultAreaRenderer2D.java

示例8: getArea

import de.erichseifert.gral.util.GraphicsUtils; //导入方法依赖的package包/类
/**
 * Returns the graphical representation to be drawn for the specified data
 * points.
 * @param points Points that define the shape of the area.
 * @param shape Geometric shape of the area.
 * @return Representation of the area.
 */
public Drawable getArea(final List<DataPoint> points, final Shape shape) {
	return new AbstractDrawable() {
		/** Version id for serialization. */
		private static final long serialVersionUID = 5492321759151727458L;

		/**
		 * Draws the {@code Drawable} with the specified drawing context.
		 * @param context Environment used for drawing
		 */
		public void draw(DrawingContext context) {
			Paint paint = LineAreaRenderer2D.this.getSetting(COLOR);
			GraphicsUtils.fillPaintedShape(context.getGraphics(),
				shape, paint, null);
		}
	};
}
 
开发者ID:charles-cooper,项目名称:idylfin,代码行数:24,代码来源:LineAreaRenderer2D.java

示例9: draw

import de.erichseifert.gral.util.GraphicsUtils; //导入方法依赖的package包/类
/**
 * Draws the {@code Drawable} with the specified drawing context.
 * @param context Environment used for drawing
 */
@Override
public void draw(DrawingContext context) {
	Graphics2D graphics = context.getGraphics();

	Boolean antialiasing = getSetting(ANTIALISING);

	graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
			(antialiasing != null && antialiasing.booleanValue())
				? RenderingHints.VALUE_ANTIALIAS_ON
				: RenderingHints.VALUE_ANTIALIAS_OFF);

	Paint bg = getSetting(BACKGROUND);
	if (bg != null) {
		GraphicsUtils.fillPaintedShape(graphics, getBounds(), bg, null);
	}

	Stroke stroke = getSetting(BORDER);
	if (stroke != null) {
		Paint fg = getSetting(COLOR);
		GraphicsUtils.drawPaintedShape(
				graphics, getBounds(), fg, null, stroke);
	}

	drawComponents(context);
}
 
开发者ID:charles-cooper,项目名称:idylfin,代码行数:30,代码来源:AbstractPlot.java

示例10: getLine

import de.erichseifert.gral.util.GraphicsUtils; //导入方法依赖的package包/类
/**
 * Returns a graphical representation for the line defined by
 * {@code e points}.
 * @param points Points used for creating the line.
 * @param shape Geometric shape for this line.
 * @return Representation of the line.
 */
public Drawable getLine(final List<DataPoint> points, final Shape shape) {
	Drawable d = new AbstractDrawable() {
		/** Version id for serialization. */
		private static final long serialVersionUID = 7995515716470892483L;

		/**
		 * Draws the {@code Drawable} with the specified drawing context.
		 * @param context Environment used for drawing
		 */
		public void draw(DrawingContext context) {
			// Draw line
			Paint paint = DefaultLineRenderer2D.this
				.getSetting(LineRenderer.COLOR);
			GraphicsUtils.fillPaintedShape(
				context.getGraphics(), shape, paint, null);
		}
	};
	return d;
}
 
开发者ID:charles-cooper,项目名称:idylfin,代码行数:27,代码来源:DefaultLineRenderer2D.java

示例11: getLine

import de.erichseifert.gral.util.GraphicsUtils; //导入方法依赖的package包/类
/**
 * Returns a graphical representation for the line defined by
 * {@code points}.
 * @param points Points to be used for creating the line.
 * @param shape Geometric shape for this line.
 * @return Representation of the line.
 */
public Drawable getLine(final List<DataPoint> points, final Shape shape) {
	Drawable d = new AbstractDrawable() {
		/** Version id for serialization. */
		private static final long serialVersionUID = 3641589240264518755L;

		/**
		 * Draws the {@code Drawable} with the specified drawing context.
		 * @param context Environment used for drawing
		 */
		public void draw(DrawingContext context) {
			// Draw path
			Paint paint = SmoothLineRenderer2D.this
				.getSetting(LineRenderer.COLOR);
			GraphicsUtils.fillPaintedShape(
				context.getGraphics(), shape, paint, null);
		}
	};
	return d;
}
 
开发者ID:charles-cooper,项目名称:idylfin,代码行数:27,代码来源:SmoothLineRenderer2D.java

示例12: getLine

import de.erichseifert.gral.util.GraphicsUtils; //导入方法依赖的package包/类
/**
 * Returns a graphical representation for the line defined by
 * {@code points}.
 * @param points Points to be used for creating the line.
 * @param shape Geometric shape for this line.
 * @return Representation of the line.
 */
public Drawable getLine(final List<DataPoint> points, final Shape shape) {
	Drawable d = new AbstractDrawable() {
		/** Version id for serialization. */
		private static final long serialVersionUID = -1686744943386843195L;

		/**
		 * Draws the {@code Drawable} with the specified drawing context.
		 * @param context Environment used for drawing
		 */
		public void draw(DrawingContext context) {
			// Draw path
			Paint paint = DiscreteLineRenderer2D.this
				.getSetting(LineRenderer.COLOR);
			GraphicsUtils.fillPaintedShape(
				context.getGraphics(), shape, paint, null);
		}
	};
	return d;
}
 
开发者ID:charles-cooper,项目名称:idylfin,代码行数:27,代码来源:DiscreteLineRenderer2D.java

示例13: getPoint

import de.erichseifert.gral.util.GraphicsUtils; //导入方法依赖的package包/类
@Override
public Drawable getPoint(final PointData data, final Shape shape) {
	return new AbstractDrawable() {
		/** Version id for serialization. */
		private static final long serialVersionUID1 = 1915778739867091906L;

		public void draw(DrawingContext context) {
			PointRenderer renderer = DefaultPointRenderer2D.this;

			Axis axisY = data.axes.get(1);
			AxisRenderer axisRendererY = data.axisRenderers.get(1);
			Row row = data.row;
			int col = data.col;

			ColorMapper colors = getColor();
			Paint paint = colors.get(data.index);

			GraphicsUtils.fillPaintedShape(
				context.getGraphics(), shape, paint, null);

			if (renderer.isErrorVisible()) {
				int colErrorTop = renderer.getErrorColumnTop();
				int colErrorBottom = renderer.getErrorColumnBottom();
				drawErrorBars(context, shape,
					row, data.index, col, colErrorTop, colErrorBottom,
					axisY, axisRendererY);
			}
		}
	};
}
 
开发者ID:eseifert,项目名称:gral,代码行数:31,代码来源:DefaultPointRenderer2D.java

示例14: getPoint

import de.erichseifert.gral.util.GraphicsUtils; //导入方法依赖的package包/类
@Override
public Drawable getPoint(final PointData data, final Shape shape) {
	return new AbstractDrawable() {
		/** Version id for serialization. */
		private static final long serialVersionUID = -3145112034673683520L;

		public void draw(DrawingContext context) {
			BarRenderer renderer = BarRenderer.this;

			Rectangle2D paintBoundaries = null;
			Graphics2D graphics = context.getGraphics();

			ColorMapper colors = renderer.getColor();
			Paint paint = colors.get(data.index);

			if (plot.isPaintAllBars()) {
				AffineTransform txOld = graphics.getTransform();
				Rectangle2D shapeBounds = shape.getBounds2D();
				paintBoundaries = new Rectangle2D.Double();//plot.getPlotArea().getBounds();
				paintBoundaries = new Rectangle2D.Double(
					shapeBounds.getX(), paintBoundaries.getY() - txOld.getTranslateY(),
					shapeBounds.getWidth(), paintBoundaries.getHeight()
				);
			}

			GraphicsUtils.fillPaintedShape(
				graphics, shape, paint, paintBoundaries);

			Stroke stroke = renderer.getBorderStroke();
			Paint strokePaint = renderer.getBorderColor();
			if (stroke != null && strokePaint != null) {
				GraphicsUtils.drawPaintedShape(
					graphics, shape, strokePaint, null, stroke);
			}
		}
	};
}
 
开发者ID:eseifert,项目名称:gral,代码行数:38,代码来源:BarPlot.java

示例15: draw

import de.erichseifert.gral.util.GraphicsUtils; //导入方法依赖的package包/类
@Override
public void draw(DrawingContext context) {
	double width = getPreferredSize().getWidth();
	double height = getPreferredSize().getHeight();
	Shape shape = barRenderer.getBarShape(0.0, 0.0, width, height);

	Graphics2D graphics = context.getGraphics();
	AffineTransform txOrig = graphics.getTransform();
	graphics.translate(getX(), getY());
	GraphicsUtils.fillPaintedShape(
			context.getGraphics(), shape, barRenderer.getColor().get(0), null);
	GraphicsUtils.drawPaintedShape(
			context.getGraphics(), shape, barRenderer.getBorderColor(), null, barRenderer.getBorderStroke());
	graphics.setTransform(txOrig);
}
 
开发者ID:eseifert,项目名称:gral,代码行数:16,代码来源:BarPlot.java


注:本文中的de.erichseifert.gral.util.GraphicsUtils.fillPaintedShape方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。