Merge branch 'main' into gradle-welcome-screen

This commit is contained in:
Stef Tervelde
2025-03-07 15:07:56 +01:00
7 changed files with 75 additions and 19 deletions

View File

@@ -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",

View File

@@ -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

View File

@@ -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
<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>
<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>
<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>
<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>
</tr>
</tbody>
</table>

View File

@@ -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")
}

View File

@@ -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) {

View File

@@ -2335,18 +2335,28 @@ public class PShape implements PConstants {
}
/**
* The <b>getVertexCount()</b> method returns the number of vertices that
* make up a <b>PShape</b>. In the above example, the value 4 is returned by the
* 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
* 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
* <b>getVertexCount()</b> method because 4 vertices are defined in
* <b>setup()</b>.
*
* @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;

View File

@@ -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;
}