Back to mods
scarpet-graphics project artwork

Modrinth · Minecraft mod

scarpet-graphics

Carpet extension with functions for scarpet, used for headless image manipulation (A wrapper of Processing)

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which scarpet-graphics release matches 1.19.2?

Updated 7 months ago
beta file 0.1.4
Game version 1.19.1, 1.19.2
Loader Fabric

scarpet-graphics 0.1.4 targets 1.19.1, 1.19.2 with Fabric. Do not install it on the client. It must be installed on the dedicated server. 1 required mod needs a matching file.

Where it goes

Is scarpet-graphics required on the client, server, or both?

Do not install it on the client. It must be installed on the dedicated server.

Client Not supported
Dedicated server Required
Loader for this release Fabric
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

This file is marked server-only.

What else does scarpet-graphics 0.1.4 need?

0.1.4 on 1.19.2. Every mod below is checked against that same setup.

1 required mod needs a matching file

Install Carpet first, but 1 required mod has no matching file for this setup. Do not mix loader builds to force a match.

Carpet Discarpet Optional for scarpet-graphics 0.1.4
optional
Matching file found Matched file: 1.4.7
Carpet Needed by scarpet-graphics 0.1.4
required
No matching file

We only count dependency files that match this setup. A file for another loader does not fill the gap.

Before you install it

Add scarpet-graphics without breaking your instance.

Built for scarpet-graphics 0.1.4 on 1.19.2. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 0.1.4. It targets 1.19.1, 1.19.2 with Fabric; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    Install Carpet first, but 1 required mod has no matching file for this setup. Do not mix loader builds to force a match.

  3. 03

    Put it on the correct side

    Do not install it on the client. It must be installed on the dedicated server.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 0.1.4. It opens that exact file at the source.

About this project

What does scarpet-graphics add?

scarpet-graphics

Discord

A wrapper of Processing for scarpet

This can also be used with Discarpet to send the created images via Discord.

Values

This extension adds these new scarpet values:

  • image: Wrapper for PImage
  • graphics: Wrapper for PGraphics, extends image value (meaning it can be used in the same way image can)
  • font: Wrapper for PFont

Colors are handled using numbers (0xRRGGBBAA in hex), but can be constructed from RGB and HSB using the color function.

Functions

For a more detailed documentation for these functions, see the Processing reference
Most functions are just a wrapper function for the internal processing function.
Sometimes they may have slightly different names than the original Processing functions, due to the name being already used by scarpet (e.g. copy()) or to group them (all draw_?() functions).

Graphics and Image functions

load_image(location, shared?)

Loads an image from the specified location (string).
Can be a URL, or file name (path that works just like read_file).
If shared is true, uses shared app storage.
Returns an image value.

save_image(image, location, shared?)

Saves the image in the specified location (works like load_image)

create_graphics(width, height)

Creates a new graphics object with the specified dimensions.

copy_image(source, desination, sourceX, sourceY, sourceW, sourceH, destinationX, destinationY, destinationW, destinationH)

Copies pixels from one image/graphics to another.

get_pixel(image, x, y)

Returns the color of a certain pixel.

set_pixel(image, x, y, color)

Sets the pixel on the image to the color.

begin_draw(graphics)

Prepares the graphics object for doing drawing operations on it.

end_draw(graphics)

To be called when done drawing.

Drawing functions

See the 2D Primitives section in the processing reference. (The scarpet functions have draw_ prefixed with the processing function names)

draw_background(graphics, color)

draw_rect(graphics, a, b, c, d)

draw_ellipse(graphics, a, b, c, d)

draw_line(graphics, x1, y1, x2, y2)

draw_image(graphics, image, a, b, c, d)

draw_text(graphics, text, x, y)

Mode functions

color_mode(graphics, mode)

modes: 'RGB', 'HSB'

image_mode(graphics, mode)

modes: 'CORNER', 'CORNERS', 'CENTER'

ellipse_mode(graphics, mode)

modes: 'CORNER', 'CORNERS', 'CENTER', 'RADIUS'

rect_mode(graphics, mode)

modes: 'CORNER', 'CORNERS', 'CENTER', 'RADIUS'

Utility functions

color(graphics, v1, v2, v3, alpha)

Depending on the color_mode() set, v1,v2,v3 are either r,g,b or h,s,b values

fill(graphics, color)

no_fill(graphics)

stroken(graphics, color)

no_stroke(graphics)

stroke_weight(graphics, weight)

smooth(graphics)

no_smooth(graphics)

font_list() (Equivalent to PFont.list() in processing)

text_font(graphics, font)

text_size(graphics, size)

create_font(graphics, name, size, smooth?)

text_align(graphics, alignX, alignY)

Project description from Modrinth.

Pick your setup

scarpet-graphics by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

22 available setups

Showing the newest 12 of 22 game versions. Older files are in the list below.

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

scarpet-graphics versions and loaders

2 of 6 releases match
Clear filters

Looking for an older file? The official Modrinth project page is in Resources.