diff --git a/.all-contributorsrc b/.all-contributorsrc
index 23c2827a3..5f1aa5cc6 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -1456,6 +1456,15 @@
"contributions": [
"code"
]
+ },
+ {
+ "login": "inteqam",
+ "name": "Aditya Chaudhary",
+ "avatar_url": "https://avatars.githubusercontent.com/u/104833943?v=4",
+ "profile": "https://github.com/inteqam",
+ "contributions": [
+ "code"
+ ]
}
],
"repoType": "github",
diff --git a/.github/workflows/pull_request-gradle.yml b/.github/workflows/pull_request-gradle.yml
index 8518dda78..11ae6f05a 100644
--- a/.github/workflows/pull_request-gradle.yml
+++ b/.github/workflows/pull_request-gradle.yml
@@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
include:
- - os: [self-hosted, linux, ARM64]
+ - os: ubuntu-24.04-arm
os_prefix: linux
arch: aarch64
- os: ubuntu-latest
diff --git a/README.md b/README.md
index 9d0a3ec18..313e4596c 100644
--- a/README.md
+++ b/README.md
@@ -38,6 +38,7 @@ For a quick start:
1. Fork and clone the repository
1. Open it in IntelliJ IDEA
1. Wait for Gradle to sync
+1. Next to the run Button, select the `Processing` Configuration
1. Hit Run
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
Copyright (c) 2015-now The Processing Foundation
-## All Contributors List
+## Contributors
Add yourself to the contributors list [here](https://github.com/processing/processing4-carbon-aug-19/issues/839)!
@@ -285,6 +286,7 @@ Add yourself to the contributors list [here](https://github.com/processing/proce
 Xin Xin 📋 🤔 |
 Benjamin Fox 💻 |
 e1dem 💻 |
+  Aditya Chaudhary 💻 |
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 81c4474b1..c715b9190 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -51,7 +51,7 @@ compose.desktop {
).map { "-D${it.first}=${it.second}" }.toTypedArray())
nativeDistributions{
- modules("jdk.jdi", "java.compiler", "jdk.zipfs")
+ modules("jdk.jdi", "java.compiler", "jdk.accessibility", "jdk.zipfs")
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "Processing"
@@ -240,4 +240,24 @@ afterEvaluate {
"renameWindres"
)
}
+ tasks.register("setExecutablePermissions") {
+ description = "Sets executable permissions on binaries in Processing.app resources"
+ group = "compose desktop"
+
+ doLast {
+ val resourcesPath = layout.buildDirectory.dir("compose/binaries")
+ fileTree(resourcesPath) {
+ include("**/resources/**/bin/**")
+ include("**/resources/**/*.sh")
+ include("**/resources/**/*.dylib")
+ include("**/resources/**/*.so")
+ include("**/resources/**/*.exe")
+ }.forEach { file ->
+ if (file.isFile) {
+ file.setExecutable(true, false)
+ }
+ }
+ }
+ }
+ tasks.findByName("createDistributable")?.finalizedBy("setExecutablePermissions")
}
\ No newline at end of file
diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java
index 4690c6946..78e07f34a 100644
--- a/app/src/processing/app/Base.java
+++ b/app/src/processing/app/Base.java
@@ -1364,10 +1364,10 @@ public class Base {
* @param schemeUri the full URI, including pde://
*/
public Editor handleScheme(String schemeUri) {
- var result = Schema.handleSchema(schemeUri, this);
- if (result != null) {
- return result;
- }
+// var result = Schema.handleSchema(schemeUri, this);
+// if (result != null) {
+// return result;
+// }
String location = schemeUri.substring(6);
if (location.length() > 0) {
diff --git a/core/src/processing/core/PShape.java b/core/src/processing/core/PShape.java
index 0538cb761..09c5e0736 100644
--- a/core/src/processing/core/PShape.java
+++ b/core/src/processing/core/PShape.java
@@ -2335,18 +2335,28 @@ public class PShape implements PConstants {
}
/**
- * The getVertexCount() method returns the number of vertices that
- * make up a PShape. In the above example, the value 4 is returned by the
+ * The getVertexCount() method returns the number of vertices (with an option to count children by passing true as boolean parameter to method call) that
+ * make up a PShape. By default, it does not count child vertices for GROUP shapes. To include child vertices, pass true as a boolean parameter. In the above example, the value 4 is returned by the
* getVertexCount() method because 4 vertices are defined in
* setup().
*
* @webref pshape:method
- * @webBrief Returns the total number of vertices as an int
+ * @webBrief Returns the total number of vertices as an int with an option to count children Vertex for GROUP Shapes
* @see PShape#getVertex(int)
* @see PShape#setVertex(int, float, float)
*/
+ public int getVertexCount(boolean includeChildren) {
+ if(!includeChildren && family == GROUP){
+ PGraphics.showWarning(NO_VERTICES_ERROR);
+ }
+ else if (family == PRIMITIVE) {
+ PGraphics.showWarning(NO_VERTICES_ERROR);
+ }
+ return vertexCount;
+ }
+
public int getVertexCount() {
- if (family == GROUP || family == PRIMITIVE) {
+ if(family == GROUP || family == PRIMITIVE){
PGraphics.showWarning(NO_VERTICES_ERROR);
}
return vertexCount;
diff --git a/core/src/processing/opengl/PShapeOpenGL.java b/core/src/processing/opengl/PShapeOpenGL.java
index 810cbab70..f34031f1a 100644
--- a/core/src/processing/opengl/PShapeOpenGL.java
+++ b/core/src/processing/opengl/PShapeOpenGL.java
@@ -1632,20 +1632,34 @@ public class PShapeOpenGL extends PShape {
// Setters/getters of individual vertices
-
+ //for taking the default value as false , so user don't have to explicitly enter false
+ // if user don't want to include children vertex count
@Override
public int getVertexCount() {
- if (family == GROUP) return 0; // Group shapes don't have vertices
- else {
+ return getVertexCount(false); // Calls the main method with default false
+ }
+ @Override
+ public int getVertexCount(boolean includeChildren) {
+ int count = 0;
+ // If the shape is a group, recursively count the vertices of its children
+ if (family == GROUP) {
+ if(!includeChildren){
+ return 0;
+ }
+ // Iterate through all the child shapes and count their vertices
+ for (int i = 0; i < getChildCount(); i++) {
+ count += getChild(i).getVertexCount(true); // Recursive call to get the vertex count of child shapes
+ }
+ } else {
if (root.tessUpdate) {
if (root.tessKind == TRIANGLES) {
- return lastPolyVertex - firstPolyVertex + 1;
+ count += lastPolyVertex - firstPolyVertex + 1;
} else if (root.tessKind == LINES) {
- return lastLineVertex - firstLineVertex + 1;
+ count += lastLineVertex - firstLineVertex + 1;
} else if (root.tessKind == POINTS) {
- return lastPointVertex - firstPointVertex + 1;
+ count += lastPointVertex - firstPointVertex + 1;
} else {
- return 0;
+ count += 0; // Handle other cases
}
} else {
if (family == PRIMITIVE || family == PATH) {
@@ -1653,9 +1667,10 @@ public class PShapeOpenGL extends PShape {
// tessellation
updateTessellation();
}
- return inGeo.vertexCount;
+ count += inGeo.vertexCount;
}
}
+ return count;
}