Skip to content

Commit 7452d65

Browse files
committed
Merge branch 'main' into gradle-welcome-screen
2 parents babf54e + fe152b7 commit 7452d65

File tree

7 files changed

+75
-19
lines changed

7 files changed

+75
-19
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,6 +1456,15 @@
14561456
"contributions": [
14571457
"code"
14581458
]
1459+
},
1460+
{
1461+
"login": "inteqam",
1462+
"name": "Aditya Chaudhary",
1463+
"avatar_url": "https://avatars.githubusercontent.com/u/104833943?v=4",
1464+
"profile": "https://github.com/inteqam",
1465+
"contributions": [
1466+
"code"
1467+
]
14591468
}
14601469
],
14611470
"repoType": "github",

.github/workflows/pull_request-gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
include:
20-
- os: [self-hosted, linux, ARM64]
20+
- os: ubuntu-24.04-arm
2121
os_prefix: linux
2222
arch: aarch64
2323
- os: ubuntu-latest

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ For a quick start:
3838
1. Fork and clone the repository
3939
1. Open it in IntelliJ IDEA
4040
1. Wait for Gradle to sync
41+
1. Next to the run Button, select the `Processing` Configuration
4142
1. Hit Run
4243

4344
For more information and detailed instructions, follow our [How to Build Processing](BUILD.md) guide.
@@ -64,7 +65,7 @@ For licensing information about the Processing website see the [processing-websi
6465

6566
Copyright (c) 2015-now The Processing Foundation
6667

67-
## All Contributors List
68+
## Contributors
6869

6970
Add yourself to the contributors list [here](https://github.com/processing/processing4-carbon-aug-19/issues/839)!
7071

@@ -285,6 +286,7 @@ Add yourself to the contributors list [here](https://github.com/processing/proce
285286
<td align="center" valign="top" width="16.66%"><a href="https://github.com/xinemata"><img src="https://avatars.githubusercontent.com/u/9159424?v=4?s=120" width="120px;" alt="Xin Xin"/><br /><sub><b>Xin Xin</b></sub></a><br /><a href="#eventOrganizing-xinemata" title="Event Organizing">📋</a> <a href="#ideas-xinemata" title="Ideas, Planning, & Feedback">🤔</a></td>
286287
<td align="center" valign="top" width="16.66%"><a href="http://benjaminfoxstudios.com"><img src="https://avatars.githubusercontent.com/u/234190?v=4?s=120" width="120px;" alt="Benjamin Fox"/><br /><sub><b>Benjamin Fox</b></sub></a><br /><a href="https://github.com/processing/processing4/commits?author=tracerstar" title="Code">💻</a></td>
287288
<td align="center" valign="top" width="16.66%"><a href="https://github.com/e1dem"><img src="https://avatars.githubusercontent.com/u/32488297?v=4?s=120" width="120px;" alt="e1dem"/><br /><sub><b>e1dem</b></sub></a><br /><a href="https://github.com/processing/processing4/commits?author=e1dem" title="Code">💻</a></td>
289+
<td align="center" valign="top" width="16.66%"><a href="https://github.com/inteqam"><img src="https://avatars.githubusercontent.com/u/104833943?v=4?s=120" width="120px;" alt="Aditya Chaudhary"/><br /><sub><b>Aditya Chaudhary</b></sub></a><br /><a href="https://github.com/processing/processing4/commits?author=inteqam" title="Code">💻</a></td>
288290
</tr>
289291
</tbody>
290292
</table>

app/build.gradle.kts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ compose.desktop {
5151
).map { "-D${it.first}=${it.second}" }.toTypedArray())
5252

5353
nativeDistributions{
54-
modules("jdk.jdi", "java.compiler", "jdk.zipfs")
54+
modules("jdk.jdi", "java.compiler", "jdk.accessibility", "jdk.zipfs")
5555
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
5656
packageName = "Processing"
5757

@@ -240,4 +240,24 @@ afterEvaluate {
240240
"renameWindres"
241241
)
242242
}
243+
tasks.register("setExecutablePermissions") {
244+
description = "Sets executable permissions on binaries in Processing.app resources"
245+
group = "compose desktop"
246+
247+
doLast {
248+
val resourcesPath = layout.buildDirectory.dir("compose/binaries")
249+
fileTree(resourcesPath) {
250+
include("**/resources/**/bin/**")
251+
include("**/resources/**/*.sh")
252+
include("**/resources/**/*.dylib")
253+
include("**/resources/**/*.so")
254+
include("**/resources/**/*.exe")
255+
}.forEach { file ->
256+
if (file.isFile) {
257+
file.setExecutable(true, false)
258+
}
259+
}
260+
}
261+
}
262+
tasks.findByName("createDistributable")?.finalizedBy("setExecutablePermissions")
243263
}

app/src/processing/app/Base.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,10 +1364,10 @@ private File moveLikeSketchFolder(File pdeFile, String baseName) throws IOExcept
13641364
* @param schemeUri the full URI, including pde://
13651365
*/
13661366
public Editor handleScheme(String schemeUri) {
1367-
var result = Schema.handleSchema(schemeUri, this);
1368-
if (result != null) {
1369-
return result;
1370-
}
1367+
// var result = Schema.handleSchema(schemeUri, this);
1368+
// if (result != null) {
1369+
// return result;
1370+
// }
13711371

13721372
String location = schemeUri.substring(6);
13731373
if (location.length() > 0) {

core/src/processing/core/PShape.java

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2335,18 +2335,28 @@ protected void setPath(int vcount, float[][] verts, int ccount, int[] codes) {
23352335
}
23362336

23372337
/**
2338-
* The <b>getVertexCount()</b> method returns the number of vertices that
2339-
* make up a <b>PShape</b>. In the above example, the value 4 is returned by the
2338+
* The <b>getVertexCount()</b> method returns the number of vertices (with an option to count children by passing true as boolean parameter to method call) that
2339+
* make up a <b>PShape</b>. By default, it does not count child vertices for GROUP shapes. To include child vertices, pass <b>true</b> as a boolean parameter. In the above example, the value 4 is returned by the
23402340
* <b>getVertexCount()</b> method because 4 vertices are defined in
23412341
* <b>setup()</b>.
23422342
*
23432343
* @webref pshape:method
2344-
* @webBrief Returns the total number of vertices as an int
2344+
* @webBrief Returns the total number of vertices as an int with an option to count children Vertex for GROUP Shapes
23452345
* @see PShape#getVertex(int)
23462346
* @see PShape#setVertex(int, float, float)
23472347
*/
2348+
public int getVertexCount(boolean includeChildren) {
2349+
if(!includeChildren && family == GROUP){
2350+
PGraphics.showWarning(NO_VERTICES_ERROR);
2351+
}
2352+
else if (family == PRIMITIVE) {
2353+
PGraphics.showWarning(NO_VERTICES_ERROR);
2354+
}
2355+
return vertexCount;
2356+
}
2357+
23482358
public int getVertexCount() {
2349-
if (family == GROUP || family == PRIMITIVE) {
2359+
if(family == GROUP || family == PRIMITIVE){
23502360
PGraphics.showWarning(NO_VERTICES_ERROR);
23512361
}
23522362
return vertexCount;

core/src/processing/opengl/PShapeOpenGL.java

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,30 +1632,45 @@ protected void curveVertexImpl(float x, float y, float z) {
16321632

16331633
// Setters/getters of individual vertices
16341634

1635-
1635+
//for taking the default value as false , so user don't have to explicitly enter false
1636+
// if user don't want to include children vertex count
16361637
@Override
16371638
public int getVertexCount() {
1638-
if (family == GROUP) return 0; // Group shapes don't have vertices
1639-
else {
1639+
return getVertexCount(false); // Calls the main method with default false
1640+
}
1641+
@Override
1642+
public int getVertexCount(boolean includeChildren) {
1643+
int count = 0;
1644+
// If the shape is a group, recursively count the vertices of its children
1645+
if (family == GROUP) {
1646+
if(!includeChildren){
1647+
return 0;
1648+
}
1649+
// Iterate through all the child shapes and count their vertices
1650+
for (int i = 0; i < getChildCount(); i++) {
1651+
count += getChild(i).getVertexCount(true); // Recursive call to get the vertex count of child shapes
1652+
}
1653+
} else {
16401654
if (root.tessUpdate) {
16411655
if (root.tessKind == TRIANGLES) {
1642-
return lastPolyVertex - firstPolyVertex + 1;
1656+
count += lastPolyVertex - firstPolyVertex + 1;
16431657
} else if (root.tessKind == LINES) {
1644-
return lastLineVertex - firstLineVertex + 1;
1658+
count += lastLineVertex - firstLineVertex + 1;
16451659
} else if (root.tessKind == POINTS) {
1646-
return lastPointVertex - firstPointVertex + 1;
1660+
count += lastPointVertex - firstPointVertex + 1;
16471661
} else {
1648-
return 0;
1662+
count += 0; // Handle other cases
16491663
}
16501664
} else {
16511665
if (family == PRIMITIVE || family == PATH) {
16521666
// the input geometry of primitive and path shapes is built during
16531667
// tessellation
16541668
updateTessellation();
16551669
}
1656-
return inGeo.vertexCount;
1670+
count += inGeo.vertexCount;
16571671
}
16581672
}
1673+
return count;
16591674
}
16601675

16611676

0 commit comments

Comments
 (0)