Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ Format | Read | Write |
PNG | ✅ | ✅ |
JPEG | ✅ | |
BMP | ✅ | ✅ |
QOI | ✅ | ✅ |
GIF | ✅ | |
SVG | ✅ | |
PPM | ✅ | ✅ |

### Font file formats

Expand Down Expand Up @@ -151,7 +153,7 @@ image.arrangement_fill_text(
### Square
python [examples/square.py](examples/square.py)
```py
paint = pixie.Paint(pixie.PK_SOLID)
paint = pixie.Paint(pixie.SOLID_PAINT)
paint.color = pixie.Color(1, 0, 0, 1)

ctx = image.new_context()
Expand All @@ -164,7 +166,7 @@ ctx.fill_rect(50, 50, 100, 100)
### Line
python [examples/line.py](examples/line.py)
```py
paint = pixie.Paint(pixie.PK_SOLID)
paint = pixie.Paint(pixie.SOLID_PAINT)
paint.color = pixie.parse_color("#FF5C00")

ctx = image.new_context()
Expand All @@ -178,7 +180,7 @@ ctx.stroke_segment(25, 25, 175, 175)
### Rounded rectangle
python [examples/rounded_rectangle.py](examples/rounded_rectangle.py)
```py
paint = pixie.Paint(pixie.PK_SOLID)
paint = pixie.Paint(pixie.SOLID_PAINT)
paint.color = pixie.Color(0, 1, 0, 1)

ctx = image.new_context()
Expand All @@ -202,7 +204,7 @@ path = pixie.parse_path(
"""
)

paint = pixie.Paint(pixie.PK_SOLID)
paint = pixie.Paint(pixie.SOLID_PAINT)
paint.color = pixie.parse_color("#FC427B")

image.fill_path(path, paint)
Expand All @@ -215,7 +217,7 @@ python [examples/masking.py](examples/masking.py)
lines = pixie.Image(200, 200)
lines.fill(pixie.parse_color("#FC427B"))

paint = pixie.Paint(pixie.PK_SOLID)
paint = pixie.Paint(pixie.SOLID_PAINT)
paint.color = pixie.parse_color("#F8D1DD")

ctx = lines.new_context()
Expand Down Expand Up @@ -247,7 +249,7 @@ image.draw(lines)
### Gradient
python [examples/gradient.py](examples/gradient.py)
```py
paint = pixie.Paint(pixie.PK_GRADIENT_RADIAL)
paint = pixie.Paint(pixie.RADIAL_GRADIENT_PAINT)

paint.gradient_handle_positions.append(pixie.Vector2(100, 100))
paint.gradient_handle_positions.append(pixie.Vector2(200, 100))
Expand Down Expand Up @@ -277,7 +279,7 @@ python [examples/image_tiled.py](examples/image_tiled.py)
path = pixie.Path()
path.polygon(100, 100, 70, 8)

paint = pixie.Paint(pixie.PK_IMAGE_TILED)
paint = pixie.Paint(pixie.TILED_IMAGE_PAINT)
paint.image = pixie.read_image("examples/data/baboon.png")
paint.image_mat = pixie.scale(0.08, 0.08)

Expand All @@ -291,7 +293,7 @@ python [examples/shadow.py](examples/shadow.py)
path = pixie.Path()
path.polygon(100, 100, 70, sides = 8)

paint = pixie.Paint(pixie.PK_SOLID)
paint = pixie.Paint(pixie.SOLID_PAINT)
paint.color = pixie.Color(1, 1, 1, 1)

polygon_image = pixie.Image(200, 200)
Expand Down
Binary file modified examples/blur.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/gradient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/gradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
image = pixie.Image(200, 200)
image.fill(pixie.Color(1, 1, 1, 1))

paint = pixie.Paint(pixie.PK_GRADIENT_RADIAL)
paint = pixie.Paint(pixie.RADIAL_GRADIENT_PAINT)

paint.gradient_handle_positions.append(pixie.Vector2(100, 100))
paint.gradient_handle_positions.append(pixie.Vector2(200, 100))
Expand Down
Binary file modified examples/heart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/heart.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"""
)

paint = pixie.Paint(pixie.PK_SOLID)
paint = pixie.Paint(pixie.SOLID_PAINT)
paint.color = pixie.parse_color("#FC427B")

image.fill_path(path, paint)
Expand Down
Binary file modified examples/image_tiled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/image_tiled.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
path = pixie.Path()
path.polygon(100, 100, 70, 8)

paint = pixie.Paint(pixie.PK_IMAGE_TILED)
paint = pixie.Paint(pixie.TILED_IMAGE_PAINT)
paint.image = pixie.read_image("examples/data/baboon.png")
paint.image_mat = pixie.scale(0.08, 0.08)

Expand Down
Binary file modified examples/line.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/line.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
image = pixie.Image(200, 200)
image.fill(pixie.Color(1, 1, 1, 1))

paint = pixie.Paint(pixie.PK_SOLID)
paint = pixie.Paint(pixie.SOLID_PAINT)
paint.color = pixie.parse_color("#FF5C00")

ctx = image.new_context()
Expand Down
Binary file modified examples/masking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/masking.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
lines = pixie.Image(200, 200)
lines.fill(pixie.parse_color("#FC427B"))

paint = pixie.Paint(pixie.PK_SOLID)
paint = pixie.Paint(pixie.SOLID_PAINT)
paint.color = pixie.parse_color("#F8D1DD")

ctx = lines.new_context()
Expand Down
Binary file modified examples/rounded_rectangle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/rounded_rectangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
image = pixie.Image(200, 200)
image.fill(pixie.Color(1, 1, 1, 1))

paint = pixie.Paint(pixie.PK_SOLID)
paint = pixie.Paint(pixie.SOLID_PAINT)
paint.color = pixie.Color(0, 1, 0, 1)

ctx = image.new_context()
Expand Down
Binary file modified examples/shadow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/shadow.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
path = pixie.Path()
path.polygon(100, 100, 70, sides = 8)

paint = pixie.Paint(pixie.PK_SOLID)
paint = pixie.Paint(pixie.SOLID_PAINT)
paint.color = pixie.Color(1, 1, 1, 1)

polygon_image = pixie.Image(200, 200)
Expand Down
Binary file modified examples/square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/square.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
image = pixie.Image(200, 200)
image.fill(pixie.Color(1, 1, 1, 1))

paint = pixie.Paint(pixie.PK_SOLID)
paint = pixie.Paint(pixie.SOLID_PAINT)
paint.color = pixie.Color(1, 0, 0, 1)

ctx = image.new_context()
Expand Down
Binary file modified examples/text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/text_spans.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/tiger.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.