overwrite with pgraph version
This commit is contained in:
@@ -132,12 +132,12 @@ IGraphSearch makePathFinder(Graph graph, int pathFinder) {
|
||||
}
|
||||
|
||||
void drawNodes(){
|
||||
pushStyle();
|
||||
noStroke();
|
||||
fill(255,0,255,72);
|
||||
pg_map.pushStyle();
|
||||
pg_map.noStroke();
|
||||
pg_map.fill(255,0,255,72);
|
||||
for(GraphNode node : gNodes)
|
||||
ellipse(node.xf(), node.yf(), nodeSize, nodeSize);
|
||||
popStyle();
|
||||
pg_map.ellipse(node.xf(), node.yf(), nodeSize, nodeSize);
|
||||
pg_map.popStyle();
|
||||
}
|
||||
|
||||
|
||||
@@ -166,16 +166,16 @@ void drawArrow(GraphNode fromNode, GraphNode toNode, float nodeRad, float arrowS
|
||||
awidthx = - (ey - ay);
|
||||
awidthy = ex - ax;
|
||||
|
||||
noFill();
|
||||
strokeWeight(4.0f);
|
||||
stroke(160, 128);
|
||||
line(sx,sy,ax,ay);
|
||||
pg_map.noFill();
|
||||
pg_map.strokeWeight(4.0f);
|
||||
pg_map.stroke(160, 128);
|
||||
pg_map.line(sx,sy,ax,ay);
|
||||
|
||||
noStroke();
|
||||
fill(48, 128);
|
||||
beginShape(TRIANGLES);
|
||||
vertex(ex, ey);
|
||||
vertex(ax - awidthx, ay - awidthy);
|
||||
vertex(ax + awidthx, ay + awidthy);
|
||||
endShape();
|
||||
pg_map.noStroke();
|
||||
pg_map.fill(48, 128);
|
||||
pg_map.beginShape(TRIANGLES);
|
||||
pg_map.vertex(ex, ey);
|
||||
pg_map.vertex(ax - awidthx, ay - awidthy);
|
||||
pg_map.vertex(ax + awidthx, ay + awidthy);
|
||||
pg_map.endShape();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user