當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。