Skip to content

Commit 158d3c0

Browse files
committed
Restore Processing.cpp and add rect(x,y,w,h,tl,tr,br,bl)
1 parent bac26d5 commit 158d3c0

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

src/Processing.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#if __has_include("stb_truetype.h")
2-
if __has_include("stb_truetype.h")
32
# define PROCESSING_HAS_STB_TRUETYPE 1
43
# define STB_TRUETYPE_IMPLEMENTATION
54
# include "stb_truetype.h"
@@ -1656,15 +1655,6 @@ void PApplet::quadraticVertex(float cx,float cy,float x,float y){
16561655
auto[x0,y0]=shapeVerts.back();const int sg=bezierDetailVal;
16571656
for(int i=1;i<=sg;i++){float t=i/(float)sg,u=1-t;float qx=u*u*x0+2*u*t*cx+t*t*x,qy=u*u*y0+2*u*t*cy+t*t*y;shapeVerts.push_back({qx,qy});shapeVerts3D.push_back({qx,qy,0.0f});}
16581657
}
1659-
void PApplet::quadraticVertex(float cx,float cy,float cz,float x,float y,float z){
1660-
// Convert quadratic to cubic bezier
1661-
if(!inShape||shapeVerts3D.empty()) return;
1662-
float ax=shapeVerts3D.back()[0],ay=shapeVerts3D.back()[1],az=shapeVerts3D.back()[2];
1663-
float cx1=ax+(2.f/3.f)*(cx-ax), cy1=ay+(2.f/3.f)*(cy-ay), cz1=az+(2.f/3.f)*(cz-az);
1664-
float cx2=x+(2.f/3.f)*(cx-x), cy2=y+(2.f/3.f)*(cy-y), cz2=z+(2.f/3.f)*(cz-z);
1665-
bezierVertex(cx1,cy1,cz1,cx2,cy2,cz2,x,y,z);
1666-
}
1667-
16681658
void PApplet::curveVertex(float x,float y){if(inShape){shapeVerts.push_back({x,y});shapeVerts3D.push_back({x,y,0.0f});}}
16691659
void PApplet::curveVertex(float x,float y,float z){if(inShape){shapeVerts.push_back({x,y});shapeVerts3D.push_back({x,y,z});}}
16701660
void PApplet::bezierVertex(float cx1,float cy1,float cz1,float cx2,float cy2,float cz2,float x,float y,float z){

0 commit comments

Comments
 (0)