Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
0064ac3
fix: corrected a spelling error in the readme file
Yahm3 Aug 6, 2025
26bd5a7
📝 CodeRabbit Chat: Add pytest test suite for README validation with s…
coderabbitai[bot] Aug 6, 2025
18befd2
CanvasFrame: Remove the extra threads
hexaredecimal Aug 6, 2025
cb7831d
Piccode: register native functions at the start
hexaredecimal Aug 6, 2025
fa11004
nativemods: The start of piccode specific modules
hexaredecimal Aug 6, 2025
1c90902
piccode: The piccode stdlib. This contains functions and modules for …
hexaredecimal Aug 6, 2025
cae2694
pom.xml: Build using master branch
hexaredecimal Aug 6, 2025
b172305
nativemods: Use the correct rendering function: drawLine instead of d…
hexaredecimal Aug 7, 2025
04132f6
nativemods: Do not set the color to black when drawing
hexaredecimal Aug 7, 2025
ad7e0ee
NewProjectDialog: Adds the new project dialog
hexaredecimal Aug 7, 2025
3b60e9a
examples: Adds the 1st example
hexaredecimal Aug 7, 2025
76f966e
piccode: Add documentation to the stdlib
hexaredecimal Aug 7, 2025
010a831
editor: Use reference types for working with graphic contexts
hexaredecimal Aug 8, 2025
27f95b4
piccode: Fixes the API to make it clear
hexaredecimal Aug 8, 2025
6109dfb
examples: Updates the example to reflect the lates changes
hexaredecimal Aug 8, 2025
38de586
piccode: Fix mistakes
hexaredecimal Aug 8, 2025
b9795d3
Piccode: Register the gfx module
hexaredecimal Aug 8, 2025
fcbeba1
editor: Fixed mistakes
hexaredecimal Aug 8, 2025
122def7
editor: Fix the rampant memory usage that was caused by compiling per…
hexaredecimal Aug 9, 2025
afbd1f2
pom.xml: Add JHLabs filters
hexaredecimal Aug 9, 2025
f8f7206
piccode: Adds more functions to the modules
hexaredecimal Aug 9, 2025
f7bf58d
events: Clear the output window on each compile
hexaredecimal Aug 9, 2025
1aa9059
Piccode: Register the new modules
hexaredecimal Aug 9, 2025
742a79f
Update piccode/image/image.pics
hexaredecimal Aug 9, 2025
c5fb739
.gitignore: Ignore jar files too
hexaredecimal Aug 12, 2025
4aa99b9
theme: A subscriber API for thmeming compoments
hexaredecimal Aug 12, 2025
91690fe
editor: Somehow I lost the code for switching theme on the code editor
hexaredecimal Aug 13, 2025
de70d00
CanvasFrame: I also lost code for setting colors on the canvas panel
hexaredecimal Aug 13, 2025
5d047c8
editor: Re implements more features
hexaredecimal Aug 13, 2025
d433e57
pom: Update the pom file
hexaredecimal Aug 13, 2025
741ae38
Create dependabot.yml
hexaredecimal Aug 8, 2025
eef791d
Update .github/dependabot.yml
hexaredecimal Aug 8, 2025
6126ada
build(deps): bump org.apache.maven.plugins:maven-jar-plugin
dependabot[bot] Aug 8, 2025
94d2c33
build(deps): bump org.apache.maven.plugins:maven-enforcer-plugin
dependabot[bot] Aug 8, 2025
70efef5
build(deps): bump org.junit:junit-bom from 5.12.2 to 5.13.4
dependabot[bot] Aug 8, 2025
e96dfd5
build(deps): bump org.apache.maven.plugins:maven-assembly-plugin
dependabot[bot] Aug 8, 2025
96acc34
build(deps): bump org.bidib.jbidib.com.vldocking:vldocking
dependabot[bot] Aug 8, 2025
361798e
build(deps): bump org.antlr:antlr4-runtime from 4.9.3 to 4.13.2
dependabot[bot] Aug 11, 2025
bb50ed8
build(deps): bump org.graalvm.buildtools:native-maven-plugin
dependabot[bot] Aug 11, 2025
1651a50
build(deps): bump com.formdev:flatlaf from 3.6 to 3.6.1
dependabot[bot] Aug 11, 2025
9334fb1
editor: Add a bunch of dialogs
hexaredecimal Aug 13, 2025
5428cb7
build(deps): bump org.graalvm.buildtools:native-maven-plugin
dependabot[bot] Sep 29, 2025
fe492e0
build(deps): bump org.junit:junit-bom from 5.13.4 to 6.0.0
dependabot[bot] Oct 6, 2025
292ad28
build(deps): bump org.apache.maven.plugins:maven-enforcer-plugin
dependabot[bot] Oct 6, 2025
db567a3
About: Changed the name of the organization
hexaredecimal Oct 10, 2025
48e6756
Remove the conflict
Yahm3 Aug 6, 2025
96f389d
README: Fix conflicts in readme
hexaredecimal Aug 7, 2025
f99bbb7
feat: Use the system Object to get the current working directory
Yahm3 Nov 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

version: 2
updates:
- package-ecosystem: "maven" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
target/
.mvn
mvnw*
docs/.obsidian
docs/.obsidian
*.jar
79 changes: 67 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

<table>
<tr>
<td>
<img src="./src/main/resources/applogo/appicon.png" width="40%" />
</td>
<td>
<h3>Piccaso Code</h3>
<h3>Picasso Code</h3>
<h6>Creativity + Logic + Math</h6>
<p>A code based image editor created 100% in java</p>
</td>
Expand All @@ -15,39 +14,97 @@
[![Java CI with Maven](https://github.com/Glimmr-Lang/PicassoCode/actions/workflows/maven.yml/badge.svg)](https://github.com/Glimmr-Lang/PicassoCode/actions/workflows/maven.yml)

## About
<<<<<<< HEAD
<<<<<<< HEAD
Picasso code is an image editor that uses code to create/edit an image. This allows powerful designs to be created with ease and
automation. The editor uses *PiccodeScript* as the scripting language for writing the image editing code.
=======

Piccasso code is an image editor that uses code to create/edit an image. This allows powerful designs to be created with ease and
automation. The editor uses _glimr_ as the scripting language for writing the image editing code.
>>>>>>> 0064ac3 (fix: corrected a spelling error in the readme file)
=======

Piccasso code is an image editor that uses code to create/edit an image. This allows powerful designs to be created with ease and
automation. The editor uses *glimr* as the scripting language for writing the image editing code.
automation. The editor uses _glimr_ as the scripting language for writing the image editing code.
=======
Picasso code is an image editor that uses code to create/edit an image. This allows powerful designs to be created with ease and
automation. The editor uses *PiccodeScript* as the scripting language for writing the image editing code.
>>>>>>> 455b066 (README: Fixed mistakes in the README)
>>>>>>> 955b7fb (README: Fixed mistakes in the README)

## Download
>> Coming soon

> > Coming soon

## Building

```sh
$ git clone git@github.com:hexaredecimal/Piccode.git
$ cd Piccode
<<<<<<< HEAD
<<<<<<< HEAD
$ git clone https://github.com/Glimmr-Lang/PicassoCode.git
$ cd PicassoCode
$ mvn package
```
### Test your build
```sh
$ java -jar target/Piccode-1.0-SNAPSHOT-jar-with-dependencies.jar
=======
git clone git@github.com:hexaredecimal/Piccode.git
cd Piccode
mvn package
>>>>>>> 0064ac3 (fix: corrected a spelling error in the readme file)
=======
git clone git@github.com:hexaredecimal/Piccode.git
cd Piccode
mvn package
=======
$ git clone https://github.com/Glimmr-Lang/PicassoCode.git
$ cd PicassoCode
$ mvn package
```
### Test your build
```sh
$ java -jar target/Piccode-1.0-SNAPSHOT-jar-with-dependencies.jar
>>>>>>> 455b066 (README: Fixed mistakes in the README)
>>>>>>> 955b7fb (README: Fixed mistakes in the README)
```

### Test your build

```sh
java -jar target/Piccode-1.0-SNAPSHOT-jar-with-dependencies.jar
```

## Inspired by
<<<<<<< HEAD
<<<<<<< HEAD
PicassoCode is heavily inspired by the [OpenSCAD](https://openscad.org/) program and tries to mimic its functionality
=======

Piccassocode is heavily inspired by the [OpenSCAD](https://openscad.org/) program and tries to mimic its functionality
>>>>>>> 0064ac3 (fix: corrected a spelling error in the readme file)
=======

Piccassocode is heavily inspired by the [OpenSCAD](https://openscad.org/) program and tries to mimic its functionality
=======
PicassoCode is heavily inspired by the [OpenSCAD](https://openscad.org/) program and tries to mimic its functionality
>>>>>>> 455b066 (README: Fixed mistakes in the README)
>>>>>>> 955b7fb (README: Fixed mistakes in the README)
as much as it can while still being an image editor. I was stoked when I tried OpenSCAD for the first time and ended up
challenging myself to start a new project based araound the idea. A friend suggested something that has to do with graphics
and my first though was OpenSCAD, but 2D. The idea quickly grew and the small program became an image editor.
challenging myself to start a new project based around the idea. A friend suggested something that has to do with graphics
and my first though was OpenSCAD, but 2D. The idea quickly grew and the small program became an image editor.

Comment on lines 16 to 97
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Unresolved merge conflicts and duplicated content in README

The README currently contains unresolved merge‑conflict markers (<<<<<<<, =======, >>>>>>>), duplicated/contradictory sections (e.g., multiple “About”, “Building”, and “Test your build” variants), and inconsistent naming (“Picasso code”, “Piccasso code”, “Piccassocode”, _glimr_ vs *PiccodeScript*).

This makes the documentation hard to read and will likely break any automated README validation or linting you have.

Please fully resolve the conflicts by:

  • Removing all conflict markers.
  • Choosing a single, consistent project name and scripting language reference.
  • Consolidating the build and “Test your build” instructions into one canonical version.
🧰 Tools
🪛 LanguageTool

[style] ~89-~89: You have already used ‘tries to’ in nearby sentences. Consider using one of the replacements to let your writing stand out.
Context: ...CAD](https://openscad.org/) program and tries to mimic its functionality ======= Picasso...

(REP_TRY)


[style] ~91-~91: You have already used ‘tries to’ in nearby sentences. Consider using one of the replacements to let your writing stand out.
Context: ...CAD](https://openscad.org/) program and tries to mimic its functionality >>>>>>> 455b066...

(REP_TRY)

🪛 markdownlint-cli2 (0.18.1)

17-17: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)


24-24: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


24-24: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


28-28: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)


29-29: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


29-29: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


66-66: Multiple headings with the same content

(MD024, no-duplicate-heading)


73-73: Multiple headings with the same content

(MD024, no-duplicate-heading)


80-80: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)


89-89: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)

🤖 Prompt for AI Agents
README.md lines 16-97: the file contains unresolved Git conflict markers and
duplicated/contradictory sections; remove all conflict markers, choose one
consistent project name (e.g., "PicassoCode") and one scripting language name
(e.g., "PiccodeScript" or "_glimr_") across the document, and consolidate the
duplicated "Building" and "Test your build" blocks into a single canonical
clone/build/test sequence (keep only one repository URL, one mvn package
instruction, and one java -jar test command), then proofread to ensure no
leftover markers or duplicate paragraphs remain.

## References

[java image filters](http://www.jhlabs.com/ip/filters/index.html)

[Icons8 Pack](https://icons8.com/icons/parakeet--style-parakeet)

## License

```sh
drawString("
Render::drawString("
+-----------------------------------+
| ▄▖▘ ▌ |
| ▙▌▌▛▘▀▌▛▘▛▘▛▌▛▘▛▌▛▌█▌ |
Expand All @@ -56,7 +113,5 @@ drawString("
+-----------------------------------+
", 0, 0) // Released under the MIT LICENSE
```
>> Thank you for viewing.



> > Thank you for viewing.
44 changes: 44 additions & 0 deletions examples/starrect.pics
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

IO :: import std.io
Virtual :: import std.virtual
Render :: import piccode.render
Pen :: import piccode.pen

drawStar :: (ctx, padding=0) =
ctx
|> Pen::drawLine(50+padding, 50+padding, 150-padding, 150-padding)
|> Pen::drawLine(150-padding, 50+padding, 50+padding, 150-padding)
|> Pen::drawLine(50+padding, 100, 150-padding, 100)
|> Pen::drawLine(100, 50+padding, 100, 150-padding)

drawRect :: (ctx, x, y, w, h) =
ctx
|> Pen::drawLine(x, y, x + w, y)
|> Pen::drawLine(x, y + h, x + w, y + h)
|> Pen::drawLine(x, y, x, y + w)
|> Pen::drawLine(x + w, y, x + w, y + h)

Comment on lines +14 to +20
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Bug in drawRect: using w instead of h for the left edge height

The left vertical edge is using the width as its vertical extent:

   |> Pen::drawLine(x, y, x, y + w)

This should use h to match the other sides and produce a proper rectangle.

-   |> Pen::drawLine(x, y, x, y + w)
+   |> Pen::drawLine(x, y, x, y + h)
🤖 Prompt for AI Agents
In examples/starrect.pics around lines 14 to 20, the drawRect function
mistakenly uses w for the left edge Y extent (x, y + w) causing a malformed
rectangle; change that call to use h (x, y + h) so the left vertical line
matches the rectangle height, ensuring all four edges use h for vertical extents
and w for horizontal extents.

drawDepth :: (ctx) =
ctx
|> Pen::drawLine(150, 50, 200, 70)
|> Pen::drawLine(150, 150, 200, 170)
|> Pen::drawLine(50, 150, 100, 170)

drawBackLines :: (ctx) =
ctx
|> Pen::drawLine(100, 170, 200, 170)
|> Pen::drawLine(200, 70, 200, 170)

main :: () =
let
ctx := Render::getContext()
in
ctx
|> drawRect(50, 50, 100, 100)
|> drawDepth
|> drawBackLines
|> drawStar(10)




39 changes: 39 additions & 0 deletions piccode/context/ctx.pics
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

// Module: Context
// Contains functions for creating contexts
Context :: module {

// Function: fromRect
// Creates a new context based on the one provided
//
// Parameters:
// ctx - (Reference) The graphic context
// x - (Number) The x position
// y - (Number) The y position
// w - (Number) The width
// h - (Number) The height
//
// Returns:
// - (Reference) A new graphics sub-context derived from the given context.
fromRect :: (ctx, x, y, w, h) = pic_nat_gfx_from_rect(ctx, x, y, w, h)

// Function: from
// Creates a new context based on the one provided
//
// Parameters:
// ctx - (Reference) The graphic context
//
// Returns:
// - (Reference) A new graphics context derived from the given context.
from :: (ctx) = pic_nat_gfx_from(ctx)

// Function: drop
// Frees the given context
//
// Parameters:
// ctx - (Reference) The graphic context
//
// Returns:
// - (Unit) Nothing
drop :: (ctx) = pic_nat_gfx_drop(ctx)
}
5 changes: 5 additions & 0 deletions piccode/filters/filter.pics
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

Filter :: module {
apply :: (filter, image) = pic_nat_filter_apply(filter, image)
}

8 changes: 8 additions & 0 deletions piccode/filters/metal/brushMetal.pics
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@


BrushMetal :: module {
new :: () = pic_nat_brush_metal_new()
radius :: (filter, radius) = pic_nat_brush_metal_set_rad(filter, radius)
amount :: (filter, radius) = pic_nat_brush_metal_set_amount(filter, radius)
shine :: (filter, radius) = pic_nat_brush_metal_set_shine(filter, radius)
}
17 changes: 17 additions & 0 deletions piccode/image/image.pics
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

Image :: module {
new :: (w, h) = pic_nat_image_new(w, h)
newWithType :: (w, h, type) = pic_nat_image_new_typed(w, h, type)
getContext :: (img) = pic_nat_image_get_context(img)
fromPath :: (path) = pic_nat_image_new_from_path(path)

resize :: (img, w, h) = pic_nat_image_resize(img, w, h)

Type :: module {
RGB := 1
ARGB := 2
ARGB_PRE := 3
BGR := 4
}
}

66 changes: 66 additions & 0 deletions piccode/pen/draw.pics
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@

Pen :: module {

// Function: drawLine
// Draws a line inside the specified context, based on the provided coordinates
//
// Parameters:
// ctx - (Reference) The graphic context
// startx - (Number) The start x position
// starty - (Number) The start y position
// endx - (Number) The end x position
// endy - (Number) The end y position
//
// Returns:
// - (Reference) A modified context with the rendered element.
drawLine :: (ctx, startx, starty, endx, endy) = pic_nat_draw_line(ctx, startx, starty, endx, endy)

// Function: drawRect
// Draws a rect inside the specified context, based on the provided coordinates
//
// Parameters:
// ctx - (Reference) The graphic context
// x - (Number) The x position
// y - (Number) The y position
// w - (Number) The width
// h - (Number) The height
//
// Returns:
// - (Reference) A modified context with the rendered element.
drawRect :: (ctx, x, y, w, h) = pic_nat_draw_rect(ctx, x, y, w, h)

// Function: drawRoundRect
// Draws a rounded rectangle inside the specified context, based on the provided coordinates
//
// Parameters:
// ctx - (Reference) The graphic context
// x - (Number) The x position
// y - (Number) The y position
// w - (Number) The width
// h - (Number) The height
// aw - (Number) The arc width
// ah - (Number) The arc height
//
// Returns:
// - (Reference) A modified context with the rendered element.
drawRoundRect :: (ctx, x, y, w, h, aw, ah) = pic_nat_draw_round_rect(ctx, x, y, w, h, aw, ah)

// Function: drawOval
// Draws a rect inside the specified context, based on the provided coordinates
//
// Parameters:
// ctx - (Reference) The graphic context
// x - (Number) The x position
// y - (Number) The y position
// w - (Number) The width
// h - (Number) The height
//
// Returns:
// - (Reference) A modified context with the rendered element.
drawOval :: (ctx, x, y, w, h) = pic_nat_draw_oval(ctx, x, y, w, h)

drawImage :: (ctx, image, x, y) = pic_nat_draw_image(ctx, image, x, y)

drawText :: (ctx, text, x, y) = pic_nat_draw_text(ctx, text, x, y)
}

16 changes: 16 additions & 0 deletions piccode/render/context.pics
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

// Module: Render
// Functions for working with the editor render context
Render :: module {
// Function: getContext
// returns the render context (A handle to the Render window on the screen)
//
// Parameters:
// None
//
// Returns:
// - (Reference) a handler to the Graphics2D.
getContext :: () = pic_nat_get_gfx()

}

Loading