本文整理汇总了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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}