本文整理匯總了Java中processing.core.PGraphics.noStroke方法的典型用法代碼示例。如果您正苦於以下問題:Java PGraphics.noStroke方法的具體用法?Java PGraphics.noStroke怎麽用?Java PGraphics.noStroke使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類processing.core.PGraphics
的用法示例。
在下文中一共展示了PGraphics.noStroke方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: displayParticles
import processing.core.PGraphics; //導入方法依賴的package包/類
static public void displayParticles(PGraphics pg, World world) {
int particle_num = world.getParticleCount();
if (particle_num != 0) {
float radius = world.getParticleRadius();
radius *= PARTICLE_RADIUS_SCALE;
Vec2[] particle_pos = world.getParticlePositionBuffer();
pg.beginShape(PConstants.QUADS);
pg.noFill();
pg.noStroke();
pg.textureMode(PConstants.NORMAL);
pg.texture(PARTICLE_SPRITE);
for (int i = 0; i < particle_num; i++) {
Vec2 pos = particle_pos[i];
pg.vertex(pos.x - radius, pos.y - radius, 0, 0);
pg.vertex(pos.x + radius, pos.y - radius, 1, 0);
pg.vertex(pos.x + radius, pos.y + radius, 1, 1);
pg.vertex(pos.x - radius, pos.y + radius, 0, 1);
}
pg.endShape();
}
}
示例2: drawAttribution
import processing.core.PGraphics; //導入方法依賴的package包/類
private void drawAttribution(PGraphics pGraphics) {
String name = "(C) OpenStreetMap contributors - www.openstreetmap.org/copyright";
float x = 580;
float y = 680;
float spaceWidth = pGraphics.textWidth(" ");
float textHeight = pGraphics.textAscent() + pGraphics.textDescent();
float toolTipWidth = pGraphics.textWidth(" " + name + " ");
float toolTipHeight = textHeight;
pGraphics.pushStyle();
pGraphics.noStroke();
pGraphics.fill(255, 255, 255, 30);
pGraphics.rect(x, y, toolTipWidth, toolTipHeight);
pGraphics.fill(0, 0, 0);
pGraphics.text(name, x + spaceWidth, y + pGraphics.textAscent());
pGraphics.popStyle();
}
示例3: drawToolTip
import processing.core.PGraphics; //導入方法依賴的package包/類
private void drawToolTip(PGraphics pGraphics, float x, float y) {
x = 20;
y = 20;
float spaceWidth = pGraphics.textWidth(" ");
float textHeight = pGraphics.textAscent() + pGraphics.textDescent();
float toolTipWidth = pGraphics.textWidth(name) * 11 / 10;
int toolTipLines = name.length() - name.replace("\n", "").length() + 1;
float toolTipHeight = textHeight * toolTipLines;
pGraphics.pushStyle();
pGraphics.noStroke();
pGraphics.fill(255, 255, 255);
pGraphics.rect(x, y, toolTipWidth, toolTipHeight);
pGraphics.fill(0, 0, 0);
pGraphics.text(name, x + spaceWidth, y + textHeight);
pGraphics.popStyle();
}
示例4: draw
import processing.core.PGraphics; //導入方法依賴的package包/類
public void draw(PGraphics pg){
pg.noStroke();
pg.fill(0,100,200,150);
pg.rect(px,py,sx,sy);
float tx = px+sx+5;
float ty = py+sy/2 + 5;
pg.fill(0,150);
pg.rect(px+sx, py, pg.textWidth(name)+10, sy);
pg.fill(255); pg.text(name, tx, ty);
}
示例5: drawSmallPlot
import processing.core.PGraphics; //導入方法依賴的package包/類
void drawSmallPlot(PGraphics gx)
{
// draw the small plot image on the top right corner
gx.fill(255);
gx.stroke(0);
gx.strokeWeight(1);
gx.rect(m_SmallRect.left()-1, m_SmallRect.top()-1, m_SmallRect.width()+2, m_SmallRect.height()+2); // border
if (!m_ShowSummary)
{
m_CDisplay.drawPlot(gx, dp, m_ClustInfo, m_iGroupIndex, m_SmallRect);
}
else
{
gx.stroke(128);
gx.strokeWeight(2);
m_CDisplay.drawSummaryPlot(gx, dp, m_ClustInfo, m_SmallRect, -1, false);
}
// shade the non-visible regions in the small plot image;
gx.fill(0, 40);
gx.noStroke();
Rect visibleRect = new Rect(m_SmallRect.left() + m_ZoomCoord.left() * m_SmallRect.width(),
m_SmallRect.top() + m_ZoomCoord.top() * m_SmallRect.height(),
m_ZoomCoord.width() * m_SmallRect.width(),
m_ZoomCoord.height() * m_SmallRect.height());
gx.rect(m_SmallRect.left(), m_SmallRect.top(), visibleRect.left() - m_SmallRect.left(), m_SmallRect.height());
gx.rect(visibleRect.left(), m_SmallRect.top(), visibleRect.width(), visibleRect.top() - m_SmallRect.top());
gx.rect(visibleRect.left(), visibleRect.bottom(), visibleRect.width(), m_SmallRect.bottom() - visibleRect.bottom());
gx.rect(visibleRect.right(), m_SmallRect.top(), m_SmallRect.right() - visibleRect.right(), m_SmallRect.height());
gx.noFill();
gx.stroke(0);
gx.rect(visibleRect.left(), visibleRect.top(), visibleRect.width(), visibleRect.height());
}
示例6: drawLight
import processing.core.PGraphics; //導入方法依賴的package包/類
/**
* Draw light spots on lightMap.
* @param x
* @param y
* @param Width
* @param Height
* @param brightness
* @param pg
*/
private static void drawLight(int x, int y, int Width, int Height, int brightness, PGraphics pg) {
pg.beginDraw();
pg.noStroke();
pg.fill(255, brightness / 4);
for (int i = 0; i < 10; i++) {
pg.ellipse(x, y, Width / (i + 1), Height / (i + 1));
}
pg.endDraw();
}
示例7: drawMarker
import processing.core.PGraphics; //導入方法依賴的package包/類
private void drawMarker(PGraphics pGraphics, float x, float y) {
pGraphics.pushStyle();
pGraphics.noStroke();
pGraphics.fill(128, 255, 128, 200);
pGraphics.ellipse(x, y, MARKER_SIZE, MARKER_SIZE);
pGraphics.popStyle();
}
示例8: displayMesh
import processing.core.PGraphics; //導入方法依賴的package包/類
public void displayMesh(PGraphics pg, DwIndexedFaceSet ifs){
// pg.beginShape(PConstants.TRIANGLES);
pg.textureMode(PConstants.NORMAL);
pg.texture(DEF.style.texture);
pg.noStroke();
int s0,s1,s2;
int i0,i1,i2;
float[] t0,t1,t2;
float[] v0,v1,v2;
for(int i = 0; i < DEF.FACES_COUNT; i++){
i0 = faces[i][0]; v0 = ifs.verts[i0];
i1 = faces[i][1]; v1 = ifs.verts[i1];
i2 = faces[i][2]; v2 = ifs.verts[i2];
i0 = DEF.FACES[i][0]; s0 = DEF.HILO[i0]; t0 = DEF.TEX_COORDS[i0];
i1 = DEF.FACES[i][1]; s1 = DEF.HILO[i1]; t1 = DEF.TEX_COORDS[i1];
i2 = DEF.FACES[i][2]; s2 = DEF.HILO[i2]; t2 = DEF.TEX_COORDS[i2];
int ci = DEF.FACES_COL[i];
if(DEF.style.texture != null){
DwDisplayUtils.vertex(pg, v0, t0);
DwDisplayUtils.vertex(pg, v1, t1);
DwDisplayUtils.vertex(pg, v2, t2);
} else {
// pg.fill(DEF.style.COL[s0]); DwDisplayUtils.vertex(pg, v0);
// pg.fill(DEF.style.COL[s1]); DwDisplayUtils.vertex(pg, v1);
// pg.fill(DEF.style.COL[s2]); DwDisplayUtils.vertex(pg, v2);
pg.fill(DEF.style.RGBS[ci][s0]); DwDisplayUtils.vertex(pg, v0);
pg.fill(DEF.style.RGBS[ci][s1]); DwDisplayUtils.vertex(pg, v1);
pg.fill(DEF.style.RGBS[ci][s2]); DwDisplayUtils.vertex(pg, v2);
}
}
// pg.endShape();
}
示例9: apply
import processing.core.PGraphics; //導入方法依賴的package包/類
@Override
public Object apply(WarpScriptStack stack) throws WarpScriptException {
List<Object> params = ProcessingUtil.parseParams(stack, 0);
PGraphics pg = (PGraphics) params.get(0);
pg.noStroke();
stack.push(pg);
return stack;
}