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


Java GraphicsUtil.drawCenteredArc方法代码示例

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


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

示例1: paintIconShaped

import com.cburch.logisim.util.GraphicsUtil; //导入方法依赖的package包/类
@Override
protected void paintIconShaped(InstancePainter painter) {
	Graphics g = painter.getGraphics();
	int[] xp = new int[] { 10, 2, 2, 10 };
	int[] yp = new int[] { 2, 2, 18, 18 };
	g.drawPolyline(xp, yp, 4);
	GraphicsUtil.drawCenteredArc(g, 10, 10, 8, -90, 180);
}
 
开发者ID:LogisimIt,项目名称:Logisim,代码行数:9,代码来源:AndGate.java

示例2: paintIconShaped

import com.cburch.logisim.util.GraphicsUtil; //导入方法依赖的package包/类
@Override
public void paintIconShaped(InstancePainter painter) {
	Graphics g = painter.getGraphics();
	GraphicsUtil.drawCenteredArc(g, 0, -5, 22, -90, 53);
	GraphicsUtil.drawCenteredArc(g, 0, 23, 22, 90, -53);
	GraphicsUtil.drawCenteredArc(g, -12, 9, 16, -30, 60);
}
 
开发者ID:LogisimIt,项目名称:Logisim,代码行数:8,代码来源:OrGate.java

示例3: paintAnd

import com.cburch.logisim.util.GraphicsUtil; //导入方法依赖的package包/类
static void paintAnd(InstancePainter painter, int width, int height) {
	Graphics g = painter.getGraphics();
	GraphicsUtil.switchToWidth(g, 2);
	int[] xp = new int[] { -width / 2, -width + 1, -width + 1, -width / 2 };
	int[] yp = new int[] { -width / 2, -width / 2, width / 2, width / 2 };
	GraphicsUtil.drawCenteredArc(g, -width / 2, 0, width / 2, -90, 180);

	g.drawPolyline(xp, yp, 4);
	if (height > width) {
		g.drawLine(-width + 1, -height / 2, -width + 1, height / 2);
	}
}
 
开发者ID:LogisimIt,项目名称:Logisim,代码行数:13,代码来源:PainterShaped.java

示例4: paintIconShaped

import com.cburch.logisim.util.GraphicsUtil; //导入方法依赖的package包/类
@Override
public void paintIconShaped(InstancePainter painter) {
	Graphics g = painter.getGraphics();
	int[] xp = new int[] { 8, 0, 0, 8 };
	int[] yp = new int[] { 2, 2, 18, 18 };
	g.drawPolyline(xp, yp, 4);
	GraphicsUtil.drawCenteredArc(g, 8, 10, 8, -90, 180);
	g.drawOval(16, 8, 4, 4);
}
 
开发者ID:LogisimIt,项目名称:Logisim,代码行数:10,代码来源:NandGate.java

示例5: paintIconShaped

import com.cburch.logisim.util.GraphicsUtil; //导入方法依赖的package包/类
@Override
public void paintIconShaped(InstancePainter painter) {
	Graphics g = painter.getGraphics();
	GraphicsUtil.drawCenteredArc(g, 2, -5, 22, -90, 53);
	GraphicsUtil.drawCenteredArc(g, 2, 23, 22, 90, -53);
	GraphicsUtil.drawCenteredArc(g, -10, 9, 16, -30, 60);
	GraphicsUtil.drawCenteredArc(g, -12, 9, 16, -30, 60);
}
 
开发者ID:LogisimIt,项目名称:Logisim,代码行数:9,代码来源:XorGate.java

示例6: paintIconShaped

import com.cburch.logisim.util.GraphicsUtil; //导入方法依赖的package包/类
@Override
public void paintIconShaped(InstancePainter painter) {
	Graphics g = painter.getGraphics();
	GraphicsUtil.drawCenteredArc(g, 0, -5, 22, -90, 53);
	GraphicsUtil.drawCenteredArc(g, 0, 23, 22, 90, -53);
	GraphicsUtil.drawCenteredArc(g, -12, 9, 16, -30, 60);
	g.drawOval(16, 8, 4, 4);
}
 
开发者ID:LogisimIt,项目名称:Logisim,代码行数:9,代码来源:NorGate.java

示例7: paintIconShaped

import com.cburch.logisim.util.GraphicsUtil; //导入方法依赖的package包/类
@Override
public void paintIconShaped(InstancePainter painter) {
	Graphics g = painter.getGraphics();
	GraphicsUtil.drawCenteredArc(g, 0, -5, 22, -90, 53);
	GraphicsUtil.drawCenteredArc(g, 0, 23, 22, 90, -53);
	GraphicsUtil.drawCenteredArc(g, -8, 9, 16, -30, 60);
	GraphicsUtil.drawCenteredArc(g, -10, 9, 16, -30, 60);
	g.drawOval(16, 8, 4, 4);
}
 
开发者ID:LogisimIt,项目名称:Logisim,代码行数:10,代码来源:XnorGate.java

示例8: paintAnd

import com.cburch.logisim.util.GraphicsUtil; //导入方法依赖的package包/类
public static void paintAnd(Graphics g, int x, int y, int width, int height, boolean negated) {
	if (negated)
		paintNegatedOutput(g, x, y);
	int[] xp = new int[] { x - width / 2, x - width, x - width, x - width / 2 };
	int[] yp = new int[] { y - width / 2, y - width / 2, y + width / 2, y + width / 2 };
	GraphicsUtil.drawCenteredArc(g, x - width / 2, y, width / 2, -90, 180);

	g.drawPolyline(xp, yp, 4);
	if (height > width) {
		g.drawLine(x - width, y - height / 2, x - width, y + height / 2);
	}
}
 
开发者ID:LogisimIt,项目名称:Logisim,代码行数:13,代码来源:Drawgates.java

示例9: paintOr

import com.cburch.logisim.util.GraphicsUtil; //导入方法依赖的package包/类
static void paintOr(Graphics g, int x, int y, boolean negated) {
	if (negated)
		paintNegatedOutput(g, x, y);
	GraphicsUtil.drawCenteredArc(g, x - 14, y - 10, 17, -90, 54);
	GraphicsUtil.drawCenteredArc(g, x - 14, y + 10, 17, 90, -54);
	GraphicsUtil.drawCenteredArc(g, x - 28, y, 15, -27, 54);
}
 
开发者ID:LogisimIt,项目名称:Logisim,代码行数:8,代码来源:Drawgates.java

示例10: drawOr

import com.cburch.logisim.util.GraphicsUtil; //导入方法依赖的package包/类
private void drawOr(Graphics g, int x, int y) {
	GraphicsUtil.drawCenteredArc(g, x + 21, y - 1, 36, 180, 53);
	GraphicsUtil.drawCenteredArc(g, x - 21, y - 1, 36, 0, -53);
	GraphicsUtil.drawCenteredArc(g, x, y - 28, 30, -120, 60);
}
 
开发者ID:LogisimIt,项目名称:Logisim,代码行数:6,代码来源:PlaRomPanel.java

示例11: paintXor

import com.cburch.logisim.util.GraphicsUtil; //导入方法依赖的package包/类
static void paintXor(Graphics g, int x, int y, boolean negated) {
	paintOr(g, x, y, negated);
	GraphicsUtil.drawCenteredArc(g, x - 32, y, 15, -27, 54);
}
 
开发者ID:LogisimIt,项目名称:Logisim,代码行数:5,代码来源:Drawgates.java


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