Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- A - Enum constant in enum class org.openpatch.scratch.gamepad.GamepadButton
-
The bottom face button (Cross on PlayStation).
- A - Enum constant in enum class org.openpatch.scratch.KeyCode
- absOf(double) - Static method in class org.openpatch.scratch.Operators
-
"abs" is an abbreviation for "absolute value." The absolute value of a number is its distance from 0.
- absOf(int) - Static method in class org.openpatch.scratch.Operators
-
"abs" is an abbreviation for "absolute value." The absolute value of a number is its distance from 0.
- acosOf(double) - Static method in class org.openpatch.scratch.Operators
-
"acos" is the abbreviation for "arccosine" and is also sometimes written as cos−1.
- activate(String) - Method in class org.openpatch.scratch.Shaders
- add(String, String) - Method in class org.openpatch.scratch.Shaders
-
Adds a shader, or returns the one of that name added before.
- add(Pen) - Method in class org.openpatch.scratch.Stage
-
Adds a pen of its own.
- add(Sprite) - Method in class org.openpatch.scratch.Stage
-
Adds a sprite, in front of the sprites of its layer.
- add(Text) - Method in class org.openpatch.scratch.Stage
-
Adds a text of its own.
- add(Vector2) - Method in class org.openpatch.scratch.Vector2
-
Adds another vector and returns the result
- ADD - Enum constant in enum class org.openpatch.scratch.KeyCode
- addAnimation(String, String, int) - Method in class org.openpatch.scratch.Sprite
-
Adds an animation from numbered image files: the pattern's
%dcounts from 1. - addAnimation(String, String, int, int) - Method in class org.openpatch.scratch.Sprite
-
Adds an animation from numbered image files, from one number to another: for files that count from 0, or to use only some of them.
- addAnimation(String, String, int, int, int...) - Method in class org.openpatch.scratch.Sprite
-
Adds an animation from a sprite sheet: frames of equal size, numbered row by row from the top left, starting at 0.
- addBackdrop(String) - Method in class org.openpatch.scratch.Stage
-
Adds a backdrop, named after its file.
- addBackdrop(String, String) - Method in class org.openpatch.scratch.Stage
-
Adds a backdrop.
- addBackdrop(String, String, boolean) - Method in class org.openpatch.scratch.Stage
-
Adds a backdrop, optionally stretched to the stage's size.
- addCostume(String) - Method in class org.openpatch.scratch.Sprite
-
Adds a costume from an image file, named after the file.
- addCostume(String, String) - Method in class org.openpatch.scratch.Sprite
-
Adds a costume from an image file.
- addCostume(String, String, int, int, int, int) - Method in class org.openpatch.scratch.Sprite
-
Adds a costume cut out of a larger image, e.g.
- addCostumes(String, String, int, int) - Method in class org.openpatch.scratch.Sprite
-
Adds every frame of a sprite sheet as a costume, row by row, named
name0,name1, … - addFont(String, String) - Method in class org.openpatch.scratch.Text
-
Adds a font this text can switch to; the first one added is used.
- addFrame(int[], int, int) - Method in class org.openpatch.scratch.recorder.GifEncoder
-
Adds next GIF frame as an ARGB pixel array, top row first (0xAARRGGBB).
- addGlyph(char, String) - Method in class org.openpatch.scratch.drawing.BitmapText
-
Assigns an image to a special character, such as a controller button.
- addLayerDrawer(Layer, ExtensionContext.LayerDrawer) - Method in interface org.openpatch.scratch.extension.ExtensionContext
-
Draws into a layer every frame, after the layer's canvas and before its sprites: map tiles, drawings.
- addOverlayDrawer(ExtensionContext.LayerDrawer) - Method in interface org.openpatch.scratch.extension.ExtensionContext
-
Draws above everything (UI, texts and monitors included) in stage coordinates; captures leave it out (Studio's watch pins).
- addPoint(double, double) - Method in class org.openpatch.scratch.Polygon
-
Adds a corner after the last one.
- addSound(String) - Method in class org.openpatch.scratch.Sprite
-
Adds a sound, named after its file.
- addSound(String) - Method in class org.openpatch.scratch.Stage
-
Adds a sound, named after its file.
- addSound(String, String) - Method in class org.openpatch.scratch.Sprite
-
Adds a sound (WAV or OGG).
- addSound(String, String) - Method in class org.openpatch.scratch.Stage
-
Adds a sound (WAV or OGG).
- after(double) - Method in class org.openpatch.scratch.Timer
-
False for a number of seconds from the first call on, true afterwards.
- afterFrame(BiConsumer) - Method in interface org.openpatch.scratch.extension.ExtensionContext
-
After a frame was drawn, on the window thread.
- ALICE_BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Alice Blue.
- ALL_AROUND - Enum constant in enum class org.openpatch.scratch.RotationStyle
-
Sprite can rotate in all 360 degrees
- ALT - Enum constant in enum class org.openpatch.scratch.KeyCode
- angle() - Method in class org.openpatch.scratch.Vector2
-
Returns the angle of the vector.
- ANTIQUE_WHITE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Antique White.
- AQUA - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Aqua.
- AQUAMARINE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Aquamarine.
- argb() - Method in record class org.openpatch.scratch.extension.ExtensionContext.DecodedImage
-
Returns the value of the
argbrecord component. - asinOf(double) - Static method in class org.openpatch.scratch.Operators
-
"asin" is the abbreviation for "arcsine" and is also sometimes written as sin−1.
- ask(String) - Method in class org.openpatch.scratch.Sprite
-
Asks a question: the sprite says it in a bubble, and a box to type the answer in appears at the bottom of the stage.
- ask(String) - Method in class org.openpatch.scratch.Stage
-
Asks a question in a box along the bottom of the stage, as Scratch does, with a field to type the answer in.
- atanOf(double) - Static method in class org.openpatch.scratch.Operators
-
"atan" is the abbreviation for "arctangent" and is also sometimes written as tan−1.
- AZURE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Azure.
B
- B - Enum constant in enum class org.openpatch.scratch.gamepad.GamepadButton
-
The right face button (Circle).
- B - Enum constant in enum class org.openpatch.scratch.KeyCode
- BACK - Enum constant in enum class org.openpatch.scratch.gamepad.GamepadButton
-
The small button left of the middle (Share, View, Select).
- BACK_QUOTE - Enum constant in enum class org.openpatch.scratch.KeyCode
- BACK_SLASH - Enum constant in enum class org.openpatch.scratch.KeyCode
- BACKGROUND - Enum constant in enum class org.openpatch.scratch.Layer
-
Behind the sprites of
Layer.MAIN: scenery, and where pens draw by default. - BACKSPACE - Enum constant in enum class org.openpatch.scratch.KeyCode
- beforeTick(Consumer) - Method in interface org.openpatch.scratch.extension.ExtensionContext
-
Every tick, after the tick's input and before timers and
run(). - BEIGE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Beige.
- BISQUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Bisque.
- BitmapText - Class in org.openpatch.scratch.drawing
-
Text made from image glyphs, such as font065.png for 'A'.
- BitmapText(String) - Constructor for class org.openpatch.scratch.drawing.BitmapText
- BLACK - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Black.
- BLANCHED_ALMOND - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Blanched Almond.
- BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Blue.
- BLUE_VIOLET - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Blue Violet.
- Bounds - Record Class in org.openpatch.scratch
-
A rectangle along the axes: the bounds of a shape.
- Bounds(double, double, double, double) - Constructor for record class org.openpatch.scratch.Bounds
-
Creates an instance of a
Boundsrecord class. - BOX - Enum constant in enum class org.openpatch.scratch.TextStyle
- broadcast(String) - Method in class org.openpatch.scratch.Sprite
-
Sends a message to the stage and every sprite on it; their
Sprite.whenIReceive(String)runs at once, before this method returns. - broadcast(String) - Method in class org.openpatch.scratch.Stage
-
Sends a message to every sprite and then the stage; their
whenIReceiveruns at once. - BROWN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Brown.
- BURLYWOOD - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Burlywood.
- button() - Method in record class org.openpatch.scratch.extension.ExtensionContext.MouseEvent
-
Returns the value of the
buttonrecord component.
C
- C - Enum constant in enum class org.openpatch.scratch.KeyCode
- CADET_BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Cadet Blue.
- Camera - Class in org.openpatch.scratch
-
The camera of a stage: which part of the world the stage shows.
- Camera() - Constructor for class org.openpatch.scratch.Camera
-
A camera at (0, 0) with zoom 100.
- CANCEL - Enum constant in enum class org.openpatch.scratch.KeyCode
- Canvas - Class in org.openpatch.scratch.extension
-
What a layer drawer draws with: it records into the draw list, nothing is drawn at once and no OpenGL is exposed.
- CAPS_LOCK - Enum constant in enum class org.openpatch.scratch.KeyCode
- ceilingOf(double) - Static method in class org.openpatch.scratch.Operators
-
This always rounds the number up to the least whole number greater than or equal to the number.
- CENTER - Enum constant in enum class org.openpatch.scratch.MouseCode
-
Represents the center (or middle) mouse button.
- CENTER - Enum constant in enum class org.openpatch.scratch.TextAlign
-
Centred on its position.
- changeColor(double) - Method in class org.openpatch.scratch.Pen
- changeColorEffect(double) - Method in class org.openpatch.scratch.Sprite
- changeColorEffect(double) - Method in class org.openpatch.scratch.Stage
- changeHeight(double) - Method in class org.openpatch.scratch.Sprite
- changePosition(double, double) - Method in class org.openpatch.scratch.Sprite
- changePosition(Vector2) - Method in class org.openpatch.scratch.Sprite
- changeSize(double) - Method in class org.openpatch.scratch.Pen
- changeSize(double) - Method in class org.openpatch.scratch.Sprite
- changeTransparency(double) - Method in class org.openpatch.scratch.Pen
- changeTransparency(double) - Method in class org.openpatch.scratch.Sprite
- changeTransparency(double) - Method in class org.openpatch.scratch.Stage
- changeVolume(double) - Method in class org.openpatch.scratch.Sprite
- changeVolume(double) - Method in class org.openpatch.scratch.Stage
- changeWidth(double) - Method in class org.openpatch.scratch.Sprite
- changeX(double) - Method in class org.openpatch.scratch.Camera
- changeX(double) - Method in class org.openpatch.scratch.Sprite
- changeY(double) - Method in class org.openpatch.scratch.Camera
- changeY(double) - Method in class org.openpatch.scratch.Sprite
- changeZoom(double) - Method in class org.openpatch.scratch.Camera
- CHARTREUSE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Chartreuse.
- CHOCOLATE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Chocolate.
- Circle - Class in org.openpatch.scratch
-
A circle.
- Circle(double, double, double) - Constructor for class org.openpatch.scratch.Circle
- clear() - Method in class org.openpatch.scratch.gamepad.GamepadState
-
Empties the whole state.
- CLEAR - Enum constant in enum class org.openpatch.scratch.KeyCode
- clip(double, double, double, double) - Method in class org.openpatch.scratch.drawing.Drawing
-
Draws only inside a rectangle until
Drawing.noClip(); a turned sprite clips to the rectangle around the turned one. - clip(double, double, double, double) - Method in class org.openpatch.scratch.extension.Canvas
-
Draws only inside a rectangle (axis-aligned on the screen) until
Canvas.noClip(). - Clock - Class in org.openpatch.scratch
-
The date and time of the computer the program runs on, the same values Scratch's "current [year]" and "days since 2000" blocks report.
- clone() - Method in class org.openpatch.scratch.Vector2
-
Creates a clone of the vector
- CLOSE_BRACKET - Enum constant in enum class org.openpatch.scratch.KeyCode
- Color - Class in org.openpatch.scratch
-
A colour.
- Color(double, double, double) - Constructor for class org.openpatch.scratch.Color
-
A colour from red, green and blue, each from 0 to 255 (values outside are clamped).
- Color(double, double, double, double) - Constructor for class org.openpatch.scratch.Color
-
A colour from red, green, blue and alpha, each from 0 to 255 (values outside are clamped).
- Color(String) - Constructor for class org.openpatch.scratch.Color
-
A colour from a hex code as in HTML and CSS:
"#ff8000","ff8000","#f80", or with alpha"#ff800080". - COMMA - Enum constant in enum class org.openpatch.scratch.KeyCode
- connected(int) - Method in class org.openpatch.scratch.gamepad.GamepadState
-
Whether a controller sits in the player's slot.
- constrain(double, double, double) - Static method in class org.openpatch.scratch.Operators
-
Constrains a value to not exceed a maximum and minimum value.
- constrain(int, int, int) - Static method in class org.openpatch.scratch.Operators
-
Constrains a value to not exceed a maximum and minimum value.
- contains(double, double) - Method in class org.openpatch.scratch.Shape
- CONTEXT_MENU - Enum constant in enum class org.openpatch.scratch.KeyCode
- copy(T, T) - Method in class org.openpatch.scratch.extension.ExtensionContext.InputKey
-
For the core: copies one state into another.
- copyFrom(GamepadState) - Method in class org.openpatch.scratch.gamepad.GamepadState
-
Copies
frominto this state, replacing everything. - CORAL - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Coral.
- coreVersion() - Static method in interface org.openpatch.scratch.extension.Extension
-
The version of the core library, e.g.
- CORNFLOWER_BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Cornflower Blue.
- CORNSILK - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Cornsilk.
- cosOf(double) - Static method in class org.openpatch.scratch.Operators
-
"cos" is the abbreviation for "cosine." The cosine of an angle is the ratio between the length of the side adjacent (next to) it on the triangle and the length of the hypotenuse.
- count(Class) - Method in class org.openpatch.scratch.Stage
- create() - Method in class org.openpatch.scratch.extension.ExtensionContext.InputKey
-
For the core: makes a state for this key.
- createClone() - Method in class org.openpatch.scratch.Sprite
-
Makes a clone: a copy of this sprite with the same costumes, position, direction, effects and variables, added to the stage just behind this sprite, as in Scratch.
- CRIMSON - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Crimson.
- CROSSFADE - Static variable in class org.openpatch.scratch.Transition
-
Blends the old stage into the new one.
- CTRL - Enum constant in enum class org.openpatch.scratch.KeyCode
- CYAN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Cyan.
D
- D - Enum constant in enum class org.openpatch.scratch.KeyCode
- DARK_BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dark Blue.
- DARK_CYAN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dark Cyan.
- DARK_GOLDENROD - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dark Goldenrod.
- DARK_GRAY - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dark Gray.
- DARK_GREEN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dark Green.
- DARK_KHAKI - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dark Khaki.
- DARK_MAGENTA - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dark Magenta.
- DARK_OLIVE_GREEN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dark Olive Green.
- DARK_ORANGE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dark Orange.
- DARK_ORCHID - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dark Orchid.
- DARK_RED - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dark Red.
- DARK_SALMON - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dark Salmon.
- DARK_SEA_GREEN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dark Sea Green.
- DARK_SLATE_BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dark Slate Blue.
- DARK_SLATE_GRAY - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dark Slate Gray.
- DARK_TURQUOISE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dark Turquoise.
- DARK_VIOLET - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dark Violet.
- deactivate(String) - Method in class org.openpatch.scratch.Shaders
- debug(Object...) - Method in class org.openpatch.scratch.Sprite
-
Prints values for debugging, but only while debug mode is on (
window.setDebug(true)or F12). - debug(Object...) - Method in class org.openpatch.scratch.Stage
-
Prints values for debugging, but only while debug mode is on.
- debug(Object...) - Method in class org.openpatch.scratch.Window
-
Prints values, but only in debug mode.
- DECIMAL - Enum constant in enum class org.openpatch.scratch.KeyCode
- decode(byte[]) - Method in interface org.openpatch.scratch.extension.ExtensionContext.ImageDecoder
- DecodedImage(int, int, int[]) - Constructor for record class org.openpatch.scratch.extension.ExtensionContext.DecodedImage
-
Creates an instance of a
DecodedImagerecord class. - DEEP_PINK - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Deep Pink.
- DEEP_SKY_BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Deep Sky Blue.
- DEFAULT - Enum constant in enum class org.openpatch.scratch.TextAlign
-
Whatever the text style already uses.
- DELETE - Enum constant in enum class org.openpatch.scratch.KeyCode
- deleteThisClone() - Method in class org.openpatch.scratch.Sprite
-
Removes this sprite if it is a clone, stopping its sounds; does nothing for the original.
- DIGIT_0 - Enum constant in enum class org.openpatch.scratch.KeyCode
- DIGIT_1 - Enum constant in enum class org.openpatch.scratch.KeyCode
- DIGIT_2 - Enum constant in enum class org.openpatch.scratch.KeyCode
- DIGIT_3 - Enum constant in enum class org.openpatch.scratch.KeyCode
- DIGIT_4 - Enum constant in enum class org.openpatch.scratch.KeyCode
- DIGIT_5 - Enum constant in enum class org.openpatch.scratch.KeyCode
- DIGIT_6 - Enum constant in enum class org.openpatch.scratch.KeyCode
- DIGIT_7 - Enum constant in enum class org.openpatch.scratch.KeyCode
- DIGIT_8 - Enum constant in enum class org.openpatch.scratch.KeyCode
- DIGIT_9 - Enum constant in enum class org.openpatch.scratch.KeyCode
- DIM_GRAY - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dim Gray.
- direction() - Method in class org.openpatch.scratch.Vector2
-
Returns the direction of the vector in Scratch's degrees: 0 points up, 90 to the right, 180 down and 270 to the left, the way
setDirectionon a sprite counts. - DIRECTION_DOWN - Static variable in class org.openpatch.scratch.Sprite
-
Direction pointing down (180 degrees).
- DIRECTION_LEFT - Static variable in class org.openpatch.scratch.Sprite
-
Direction pointing left (270 degrees).
- DIRECTION_RIGHT - Static variable in class org.openpatch.scratch.Sprite
-
Direction pointing right (90 degrees), where a new sprite points.
- DIRECTION_UP - Static variable in class org.openpatch.scratch.Sprite
-
Direction pointing up (0 degrees).
- disableHitbox() - Method in class org.openpatch.scratch.Sprite
-
Touching ignores this sprite until
Sprite.enableHitbox(). - disableNineSlice() - Method in class org.openpatch.scratch.Sprite
-
Stretches the whole costume again.
- dispatch(Stage, Class, Consumer) - Method in interface org.openpatch.scratch.extension.ExtensionContext
-
Calls a listener interface on the stage and every sprite of it that implements it, at the point of the tick where key events arrive.
- display(String) - Method in class org.openpatch.scratch.Stage
-
Shows a text in a band along the bottom of the stage until something else is displayed; an empty text removes the band.
- display(String, double) - Method in class org.openpatch.scratch.Stage
-
Shows a text in a band along the bottom of the stage for a number of seconds of game time.
- distance(Vector2) - Method in class org.openpatch.scratch.Vector2
-
Calculates the distance to another vector.
- distanceSq(Vector2) - Method in class org.openpatch.scratch.Vector2
-
Calculates the squared distance to another vector.
- distanceToMousePointer() - Method in class org.openpatch.scratch.Sprite
- distanceToSprite(Sprite) - Method in class org.openpatch.scratch.Sprite
- DIVIDE - Enum constant in enum class org.openpatch.scratch.KeyCode
- DODGER_BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Dodger Blue.
- DONT - Enum constant in enum class org.openpatch.scratch.RotationStyle
-
Sprite does not rotate at all
- dot(Vector2) - Method in class org.openpatch.scratch.Vector2
-
Calculates the dot product.
- down() - Method in class org.openpatch.scratch.Pen
-
Puts the pen down: it leaves a dot, and a line wherever it moves.
- DOWN - Enum constant in enum class org.openpatch.scratch.KeyCode
- DPAD_DOWN - Enum constant in enum class org.openpatch.scratch.gamepad.GamepadButton
-
The down direction of the direction pad.
- DPAD_LEFT - Enum constant in enum class org.openpatch.scratch.gamepad.GamepadButton
-
The left direction of the direction pad.
- DPAD_RIGHT - Enum constant in enum class org.openpatch.scratch.gamepad.GamepadButton
-
The right direction of the direction pad.
- DPAD_UP - Enum constant in enum class org.openpatch.scratch.gamepad.GamepadButton
-
The up direction of the direction pad.
- draw(Drawing) - Method in class org.openpatch.scratch.drawing.BitmapText
- draw(Drawing) - Method in class org.openpatch.scratch.drawing.DrawingSprite
-
Draws the sprite; called every frame on the game thread.
- draw(Stage, Canvas) - Method in interface org.openpatch.scratch.extension.ExtensionContext.LayerDrawer
- drawImage(String, double, double, double, double) - Method in class org.openpatch.scratch.extension.Canvas
-
An image (a file or a built-in sprite name), centred on a point.
- drawImageQuad(String, int, int, int, int, double[]) - Method in class org.openpatch.scratch.extension.Canvas
-
A region of an image on any quad: turned, mirrored, sheared.
- drawImageRegion(String, int, int, int, int, double, double, double, double) - Method in class org.openpatch.scratch.extension.Canvas
-
A region of an image, centred on a point: one tile of a tileset, one glyph of a bitmap font.
- Drawing - Class in org.openpatch.scratch.drawing
-
What a
DrawingSpritedraws with indraw(Drawing): coordinates are the sprite's own, with (0, 0) at its position and y up; they turn, mirror and grow with the sprite. - DrawingExtension - Class in org.openpatch.scratch.drawing
-
Registers the drawing extension; found through ServiceLoader, learners never see it.
- DrawingExtension() - Constructor for class org.openpatch.scratch.drawing.DrawingExtension
- DrawingSprite - Class in org.openpatch.scratch.drawing
-
A sprite that draws itself with shapes and images instead of a costume: override
DrawingSprite.draw(Drawing). - DrawingSprite() - Constructor for class org.openpatch.scratch.drawing.DrawingSprite
-
A drawing sprite; it has no hitbox unless given one.
- drawOutline(double[], double[], Color, double) - Method in class org.openpatch.scratch.extension.Canvas
-
The outline of a polygon.
- drawPolygon(double[], double[], Color) - Method in class org.openpatch.scratch.extension.Canvas
-
A filled polygon, concave ones included.
- drawRectangle(double, double, double, double, Color) - Method in class org.openpatch.scratch.extension.Canvas
-
A filled rectangle centred on a point.
- drawText(String, double, double, double, Color) - Method in class org.openpatch.scratch.extension.Canvas
-
A line of text whose first baseline starts at a point, in the default font.
- during(double) - Method in class org.openpatch.scratch.Timer
-
True for a number of seconds from the first call on, false afterwards.
E
- E - Enum constant in enum class org.openpatch.scratch.KeyCode
- ellipse - Variable in class org.openpatch.scratch.tiled.MapObject
-
An object representing an ellipse shape.
- Ellipse - Class in org.openpatch.scratch
-
An ellipse inside a rectangle along the axes.
- Ellipse(double, double, double, double) - Constructor for class org.openpatch.scratch.Ellipse
- enableHitbox() - Method in class org.openpatch.scratch.Sprite
-
Touching counts this sprite again.
- END - Enum constant in enum class org.openpatch.scratch.KeyCode
- ENTER - Enum constant in enum class org.openpatch.scratch.KeyCode
- equals(Object) - Method in record class org.openpatch.scratch.Bounds
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in class org.openpatch.scratch.Color
-
Two colours are equal when they pack into the same ARGB number.
- equals(Object) - Method in record class org.openpatch.scratch.extension.ExtensionContext.DecodedImage
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class org.openpatch.scratch.extension.ExtensionContext.KeyEvent
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class org.openpatch.scratch.extension.ExtensionContext.LearnerError
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class org.openpatch.scratch.extension.ExtensionContext.MouseEvent
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in class org.openpatch.scratch.Vector2
-
Compares this vector with another object.
- EQUALS - Enum constant in enum class org.openpatch.scratch.KeyCode
- eraseAll() - Method in class org.openpatch.scratch.Pen
-
Erases everything drawn on the pen's layer, by any pen or stamp.
- eraseAll() - Method in class org.openpatch.scratch.Stage
-
Erases everything every pen drew and everything stamped, on every layer.
- error() - Method in record class org.openpatch.scratch.extension.ExtensionContext.LearnerError
-
Returns the value of the
errorrecord component. - ESCAPE - Enum constant in enum class org.openpatch.scratch.KeyCode
- eToThePowerOf(double) - Static method in class org.openpatch.scratch.Operators
-
"e" is an abbreviation for "Euler's number", which is about 2.718.
- every(double) - Method in class org.openpatch.scratch.Timer
-
True once every number of seconds: the first time that many seconds after the first call, then again each time as many seconds have passed.
- exit() - Method in class org.openpatch.scratch.Window
-
Ends the program:
Window.whenExits()runs first. - extension(Class, Supplier) - Method in class org.openpatch.scratch.Sprite
-
An extension's state for this sprite, made on first use; a clone gets its own.
- extension(Class, Supplier) - Method in class org.openpatch.scratch.Stage
-
An extension's state for this stage, made on first use.
- Extension - Interface in org.openpatch.scratch.extension
-
An extension: found through
ServiceLoader(a line inMETA-INF/services/org.openpatch.scratch.extension.Extension) or registered withWindow.use(...), installed once when the window is created. - ExtensionContext - Interface in org.openpatch.scratch.extension
-
What an extension may hook into.
- ExtensionContext.DecodedImage - Record Class in org.openpatch.scratch.extension
-
Decoded pixels from an image format of an extension's.
- ExtensionContext.Frame - Interface in org.openpatch.scratch.extension
-
A drawn frame at stage size; its pixels are read back only when asked for.
- ExtensionContext.ImageDecoder - Interface in org.openpatch.scratch.extension
-
Turns the bytes of an image file into pixels; runs on loading threads.
- ExtensionContext.InputKey<T> - Class in org.openpatch.scratch.extension
-
A slot in the input snapshot: polled on the window thread, copied to the game thread with each batch of ticks, so no locking is needed.
- ExtensionContext.InputSnapshot - Interface in org.openpatch.scratch.extension
-
The window thread's side of the input snapshot, filled by
ExtensionContext.onInputPoll(Consumer). - ExtensionContext.KeyEvent - Record Class in org.openpatch.scratch.extension
-
A key went down or up (auto-repeat never arrives).
- ExtensionContext.LayerDrawer - Interface in org.openpatch.scratch.extension
-
Draws into a layer of a stage.
- ExtensionContext.LearnerError - Record Class in org.openpatch.scratch.extension
-
An exception from learner code, with the learner's frame (null if there is none).
- ExtensionContext.MouseEvent - Record Class in org.openpatch.scratch.extension
-
Something the mouse did, in stage coordinates.
- ExtensionContext.MouseEvent.Kind - Enum Class in org.openpatch.scratch.extension
-
What happened.
F
- F - Enum constant in enum class org.openpatch.scratch.KeyCode
- F1 - Enum constant in enum class org.openpatch.scratch.KeyCode
- F10 - Enum constant in enum class org.openpatch.scratch.KeyCode
- F11 - Enum constant in enum class org.openpatch.scratch.KeyCode
- F12 - Enum constant in enum class org.openpatch.scratch.KeyCode
- F2 - Enum constant in enum class org.openpatch.scratch.KeyCode
- F3 - Enum constant in enum class org.openpatch.scratch.KeyCode
- F4 - Enum constant in enum class org.openpatch.scratch.KeyCode
- F5 - Enum constant in enum class org.openpatch.scratch.KeyCode
- F6 - Enum constant in enum class org.openpatch.scratch.KeyCode
- F7 - Enum constant in enum class org.openpatch.scratch.KeyCode
- F8 - Enum constant in enum class org.openpatch.scratch.KeyCode
- F9 - Enum constant in enum class org.openpatch.scratch.KeyCode
- FADE - Static variable in class org.openpatch.scratch.Transition
-
Fades the old stage to black, then the new one in.
- File - Class in org.openpatch.scratch.save
-
Saves objects as JSON files and loads them again: their public fields and bean properties (getters and setters), with lists, maps, arrays, enums and nested objects.
- File() - Constructor for class org.openpatch.scratch.save.File
- find(Class) - Method in class org.openpatch.scratch.Stage
- finish() - Method in class org.openpatch.scratch.recorder.GifEncoder
-
Flushes any pending data and closes output file.
- FIREBRICK - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Firebrick.
- floorOf(double) - Static method in class org.openpatch.scratch.Operators
-
This always rounds the number down to the greatest whole number less than or equal to the number.
- FLORAL_WHITE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Floral White.
- FOREGROUND - Enum constant in enum class org.openpatch.scratch.Layer
-
In front of the sprites of
Layer.MAIN. - FOREST_GREEN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Forest Green.
- fromARGB(int) - Static method in class org.openpatch.scratch.Color
-
A colour from a packed ARGB number, as
Color.toARGB()gives it. - fromHSB(double, double, double) - Static method in class org.openpatch.scratch.Color
-
A colour from Scratch's colour, saturation and brightness, each from 0 to 100.
- fromPolar(double, double) - Static method in class org.openpatch.scratch.Vector2
-
Constructor method for constructing a vector based on polar coordinates.
- fromShader(String) - Static method in class org.openpatch.scratch.Transition
-
A transition of your own: a shader body with
from,to(the two pictures),progress(0 to 1),uvandcolor. - FUCHSIA - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Fuchsia.
G
- G - Enum constant in enum class org.openpatch.scratch.KeyCode
- GAINSBORO - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Gainsboro.
- Gamepad - Class in org.openpatch.scratch.gamepad
-
Asks the connected controllers, like a gamepad's blocks in other Scratch dialects.
- GamepadButton - Enum Class in org.openpatch.scratch.gamepad
-
A button of a gamepad, in Xbox positions.
- GamepadExtension - Class in org.openpatch.scratch.gamepad
-
Registers the gamepad extension; found through ServiceLoader, learners never see it.
- GamepadExtension() - Constructor for class org.openpatch.scratch.gamepad.GamepadExtension
- GamepadListener - Interface in org.openpatch.scratch.gamepad
-
What a stage or sprite is told about the controllers, at the same point of the tick as key events (before
run()): a button going down or up on any player's controller, and a controller appearing in a player's slot. - GamepadSource - Interface in org.openpatch.scratch.gamepad
-
Where the controllers' state comes from.
- GamepadState - Class in org.openpatch.scratch.gamepad
-
What the controllers were like at one point in time: every player slot's buttons, sticks and triggers.
- GamepadState() - Constructor for class org.openpatch.scratch.gamepad.GamepadState
-
No controller connected, nothing pressed, sticks and triggers at rest.
- GamepadStick - Enum Class in org.openpatch.scratch.gamepad
-
One of a gamepad's two sticks.
- GamepadTrigger - Enum Class in org.openpatch.scratch.gamepad
-
One of a gamepad's two analog triggers (the shoulder buttons that go down gradually).
- get(String) - Method in class org.openpatch.scratch.Shaders
- get(ExtensionContext.InputKey) - Method in interface org.openpatch.scratch.extension.ExtensionContext.InputSnapshot
- getActive() - Method in class org.openpatch.scratch.Shaders
- getAlign() - Method in class org.openpatch.scratch.Text
- getAll() - Method in class org.openpatch.scratch.Stage
- getAlpha() - Method in class org.openpatch.scratch.Color
- getAnimationFrame() - Method in class org.openpatch.scratch.Sprite
- getAnimationInterval() - Method in class org.openpatch.scratch.Sprite
- getAnswer() - Method in class org.openpatch.scratch.Sprite
- getAnswer() - Method in class org.openpatch.scratch.Stage
- getArgb() - Method in interface org.openpatch.scratch.extension.ExtensionContext.Frame
-
Straight ARGB, top row first.
- getArgb(int, int) - Method in class org.openpatch.scratch.Pixels
- getBlue() - Method in class org.openpatch.scratch.Color
- getBounds() - Method in class org.openpatch.scratch.Shape
- getBrightness() - Method in class org.openpatch.scratch.Color
- getCamera() - Method in class org.openpatch.scratch.Stage
- getColor() - Method in class org.openpatch.scratch.Pen
- getColor() - Method in class org.openpatch.scratch.Stage
- getColor(int, int) - Method in class org.openpatch.scratch.Pixels
- getColorEffect() - Method in class org.openpatch.scratch.Sprite
- getColorEffect() - Method in class org.openpatch.scratch.Stage
- getContent() - Method in class org.openpatch.scratch.drawing.BitmapText
- getCurrent() - Method in class org.openpatch.scratch.Shaders
- getCurrentBackdropIndex() - Method in class org.openpatch.scratch.Stage
- getCurrentBackdropName() - Method in class org.openpatch.scratch.Stage
- getCurrentCostumeIndex() - Method in class org.openpatch.scratch.Sprite
- getCurrentCostumeName() - Method in class org.openpatch.scratch.Sprite
- getCurrentFontIndex() - Method in class org.openpatch.scratch.Text
- getCurrentFontName() - Method in class org.openpatch.scratch.Text
- getCurrentIndex() - Method in class org.openpatch.scratch.Shaders
- getCurrentName() - Method in class org.openpatch.scratch.Shaders
- getDay() - Static method in class org.openpatch.scratch.Clock
-
Returns the current day of the month, from 1 to 31.
- getDayOfWeek() - Static method in class org.openpatch.scratch.Clock
-
Returns the current day of the week, from 1 for Monday to 7 for Sunday.
- getDaysSince2000() - Static method in class org.openpatch.scratch.Clock
-
Returns the number of days that have passed since the first of January 2000.
- getDefaultFont() - Static method in class org.openpatch.scratch.Text
- getDefaultFontSize() - Static method in class org.openpatch.scratch.Text
- getDirection() - Method in class org.openpatch.scratch.Sprite
- getFont() - Method in class org.openpatch.scratch.Text
- getFrameSmoothing() - Static method in class org.openpatch.scratch.Window
- getGameSpeed() - Method in class org.openpatch.scratch.Window
- getGreen() - Method in class org.openpatch.scratch.Color
- getHeight() - Method in class org.openpatch.scratch.drawing.BitmapText
- getHeight() - Method in interface org.openpatch.scratch.extension.ExtensionContext.Frame
- getHeight() - Method in class org.openpatch.scratch.Pixels
- getHeight() - Method in class org.openpatch.scratch.Sprite
- getHeight() - Method in class org.openpatch.scratch.Stage
- getHeight() - Method in class org.openpatch.scratch.tiled.TiledMap
- getHeight() - Method in class org.openpatch.scratch.Window
- getHitbox() - Method in class org.openpatch.scratch.Sprite
-
The hitbox where the sprite is now, in stage coordinates: by default the rectangle around the costume's painted pixels; null for a sprite without costumes.
- getHour() - Static method in class org.openpatch.scratch.Clock
-
Returns the current hour, from 0 to 23.
- getHue() - Method in class org.openpatch.scratch.Color
- getInstance() - Static method in class org.openpatch.scratch.Window
- getLayer() - Method in class org.openpatch.scratch.Pen
- getLayer() - Method in class org.openpatch.scratch.Sprite
- getLayer() - Method in class org.openpatch.scratch.Text
- getLibraryTitle() - Method in class org.openpatch.scratch.Window
- getLibraryVersion() - Method in class org.openpatch.scratch.Window
- getLocation() - Method in class org.openpatch.scratch.save.SaveData
-
Returns the save's location for diagnostics.
- getMillisecond() - Static method in class org.openpatch.scratch.Clock
-
Returns the milliseconds of the current second, from 0 to 999.
- getMinute() - Static method in class org.openpatch.scratch.Clock
-
Returns the current minute, from 0 to 59.
- getMonth() - Static method in class org.openpatch.scratch.Clock
-
Returns the current month, from 1 for January to 12 for December.
- getMouse() - Method in class org.openpatch.scratch.Sprite
- getMouse() - Method in class org.openpatch.scratch.Stage
- getMouseX() - Method in class org.openpatch.scratch.Sprite
- getMouseX() - Method in class org.openpatch.scratch.Stage
- getMouseY() - Method in class org.openpatch.scratch.Sprite
- getMouseY() - Method in class org.openpatch.scratch.Stage
- getName() - Method in class org.openpatch.scratch.Shader
- getName() - Method in class org.openpatch.scratch.Transition
- getObjectsFromLayer(String) - Method in class org.openpatch.scratch.tiled.TiledMap
-
Retrieves the objects from a specified layer in the tiled map.
- getPen() - Method in class org.openpatch.scratch.Sprite
- getPoints() - Method in class org.openpatch.scratch.Shape
- getPosition() - Method in class org.openpatch.scratch.Camera
- getPosition() - Method in class org.openpatch.scratch.Pen
- getPosition() - Method in class org.openpatch.scratch.Sprite
- getPosition() - Method in class org.openpatch.scratch.Text
- getProperty(String) - Method in class org.openpatch.scratch.tiled.MapObject
-
Retrieves the value of a property with the specified name from the properties list.
- getProperty(String) - Method in class org.openpatch.scratch.tiled.TiledMap
-
Reads a custom property of the map itself, such as its biome or tutorial.
- getProperty(String, String) - Method in class org.openpatch.scratch.tiled.TiledMap
-
Reads a map property, with a default for maps that omit it.
- getPropertyBoolean(String) - Method in class org.openpatch.scratch.tiled.MapObject
-
Retrieves the value of the specified property as a boolean.
- getPropertyBoolean(String) - Method in class org.openpatch.scratch.tiled.TiledMap
- getPropertyFloat(String) - Method in class org.openpatch.scratch.tiled.MapObject
-
Retrieves the value of a specified property as a float.
- getPropertyFloat(String) - Method in class org.openpatch.scratch.tiled.TiledMap
- getPropertyInt(String) - Method in class org.openpatch.scratch.tiled.MapObject
-
Retrieves the value of a property with the specified name and converts it to an integer.
- getPropertyInt(String) - Method in class org.openpatch.scratch.tiled.TiledMap
- getRandom() - Static method in class org.openpatch.scratch.HtmlColor
-
Returns a random HTML color.
- getRed() - Method in class org.openpatch.scratch.Color
- getRotationStyle() - Method in class org.openpatch.scratch.Sprite
- getSaturation() - Method in class org.openpatch.scratch.Color
- getSecond() - Static method in class org.openpatch.scratch.Clock
-
Returns the current second, from 0 to 59.
- getSeconds() - Method in class org.openpatch.scratch.Timer
- getShaders() - Method in class org.openpatch.scratch.Sprite
- getShaders() - Method in class org.openpatch.scratch.Stage
- getShape() - Method in class org.openpatch.scratch.tiled.MapObject
-
Returns a Shape object representing the current map object.
- getSize() - Method in class org.openpatch.scratch.Pen
- getSize() - Method in class org.openpatch.scratch.Sprite
- getSource() - Static method in class org.openpatch.scratch.gamepad.GamepadExtension
-
The current source of the controllers' state.
- getStage() - Method in class org.openpatch.scratch.Sprite
- getStage() - Method in class org.openpatch.scratch.Text
- getStage() - Method in class org.openpatch.scratch.Window
- getStick(int, GamepadStick) - Static method in class org.openpatch.scratch.gamepad.Gamepad
-
Where the player's controller's stick points, (0, 0) if it is not connected.
- getStick(GamepadStick) - Static method in class org.openpatch.scratch.gamepad.Gamepad
-
Where the first connected controller's stick points, (0, 0) if there is none.
- getStyle() - Method in class org.openpatch.scratch.Text
- getText() - Method in class org.openpatch.scratch.Sprite
- getText() - Method in class org.openpatch.scratch.Text
- getTextSize() - Method in class org.openpatch.scratch.Text
- getTickCount() - Method in interface org.openpatch.scratch.extension.ExtensionContext
- getTileCollisionShapes(int) - Method in class org.openpatch.scratch.tiled.TiledMap
-
Returns collision outlines defined in a tile's tileset object group.
- getTileCollisionShapes(String, int, int) - Method in class org.openpatch.scratch.tiled.TiledMap
-
Returns a cell's collision outlines in map/stage coordinates: the map's top-left is (0,0), x points right and y points up, matching map stamping.
- getTileHeight() - Method in class org.openpatch.scratch.tiled.TiledMap
- getTileId(String, int, int) - Method in class org.openpatch.scratch.tiled.TiledMap
-
Reads a global tile ID, without flip bits.
- getTileWidth() - Method in class org.openpatch.scratch.tiled.TiledMap
- getTimer() - Method in class org.openpatch.scratch.Sprite
- getTimer() - Method in class org.openpatch.scratch.Stage
- getTint() - Method in class org.openpatch.scratch.Sprite
- getTouchingSprite(Class) - Method in class org.openpatch.scratch.Sprite
- getTouchingSprites(Class) - Method in class org.openpatch.scratch.Sprite
- getTransparency() - Method in class org.openpatch.scratch.Pen
- getTransparency() - Method in class org.openpatch.scratch.Sprite
- getTransparency() - Method in class org.openpatch.scratch.Stage
- getTrigger(int, GamepadTrigger) - Static method in class org.openpatch.scratch.gamepad.Gamepad
-
How far down the player's controller's trigger is, 0 if it is not connected.
- getTrigger(GamepadTrigger) - Static method in class org.openpatch.scratch.gamepad.Gamepad
-
How far down the first connected controller's trigger is, 0 if there is none.
- getVolume() - Method in class org.openpatch.scratch.Sprite
- getVolume() - Method in class org.openpatch.scratch.Stage
- getWidth() - Method in class org.openpatch.scratch.drawing.BitmapText
- getWidth() - Method in interface org.openpatch.scratch.extension.ExtensionContext.Frame
- getWidth() - Method in class org.openpatch.scratch.Pixels
- getWidth() - Method in class org.openpatch.scratch.Sprite
- getWidth() - Method in class org.openpatch.scratch.Stage
- getWidth() - Method in class org.openpatch.scratch.Text
- getWidth() - Method in class org.openpatch.scratch.tiled.TiledMap
- getWidth() - Method in class org.openpatch.scratch.Window
- getX() - Method in class org.openpatch.scratch.Camera
- getX() - Method in class org.openpatch.scratch.Sprite
- getX() - Method in class org.openpatch.scratch.Text
- getX() - Method in class org.openpatch.scratch.Vector2
-
Returns the x coordinate of the vector
- getY() - Method in class org.openpatch.scratch.Camera
- getY() - Method in class org.openpatch.scratch.Sprite
- getY() - Method in class org.openpatch.scratch.Text
- getY() - Method in class org.openpatch.scratch.Vector2
-
Returns the y coordinate of the vector
- getYear() - Static method in class org.openpatch.scratch.Clock
-
Returns the current year, for example 2026.
- getZoom() - Method in class org.openpatch.scratch.Camera
- GHOST_WHITE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Ghost White.
- GifEncoder - Class in org.openpatch.scratch.recorder
-
Encodes a GIF file consisting of one or more frames.
- GifEncoder() - Constructor for class org.openpatch.scratch.recorder.GifEncoder
- GifRecorder - Class in org.openpatch.scratch.recorder
-
Records the stage as an animated GIF: every second frame of game time (30 a second), at stage size, texts and the UI included.
- GifRecorder(String) - Constructor for class org.openpatch.scratch.recorder.GifRecorder
- glide(double, double, double) - Method in class org.openpatch.scratch.Sprite
-
Glides to a position in a number of seconds of game time; the sprite keeps running its code meanwhile.
- goLayersBackwards(int) - Method in class org.openpatch.scratch.Sprite
- goLayersBackwards(int) - Method in class org.openpatch.scratch.Text
- goLayersForwards(int) - Method in class org.openpatch.scratch.Sprite
- goLayersForwards(int) - Method in class org.openpatch.scratch.Text
- GOLD - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Gold.
- GOLDENROD - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Goldenrod.
- goToBackLayer() - Method in class org.openpatch.scratch.Sprite
-
Moves the sprite behind every other sprite of its layer.
- goToBackLayer() - Method in class org.openpatch.scratch.Text
-
Draws this text behind the other texts.
- goToFrontLayer() - Method in class org.openpatch.scratch.Sprite
-
Moves the sprite in front of every other sprite of its layer.
- goToFrontLayer() - Method in class org.openpatch.scratch.Text
-
Draws this text in front of the other texts.
- goToMousePointer() - Method in class org.openpatch.scratch.Pen
-
Moves the pen to the mouse pointer, drawing if it is down.
- goToMousePointer() - Method in class org.openpatch.scratch.Sprite
-
Goes to the mouse pointer.
- goToRandomPosition() - Method in class org.openpatch.scratch.Pen
-
Moves the pen to a random position on the stage, drawing if it is down.
- goToRandomPosition() - Method in class org.openpatch.scratch.Sprite
-
Goes to a random position on the stage.
- goToSprite(Sprite) - Method in class org.openpatch.scratch.Sprite
- GRAY - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Gray.
- GREEN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Green.
- GREEN_YELLOW - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Green Yellow.
H
- H - Enum constant in enum class org.openpatch.scratch.KeyCode
- hashCode() - Method in record class org.openpatch.scratch.Bounds
-
Returns a hash code value for this object.
- hashCode() - Method in class org.openpatch.scratch.Color
- hashCode() - Method in record class org.openpatch.scratch.extension.ExtensionContext.DecodedImage
-
Returns a hash code value for this object.
- hashCode() - Method in record class org.openpatch.scratch.extension.ExtensionContext.KeyEvent
-
Returns a hash code value for this object.
- hashCode() - Method in record class org.openpatch.scratch.extension.ExtensionContext.LearnerError
-
Returns a hash code value for this object.
- hashCode() - Method in record class org.openpatch.scratch.extension.ExtensionContext.MouseEvent
-
Returns a hash code value for this object.
- hashCode() - Method in class org.openpatch.scratch.Vector2
-
Returns the hash code of the vector.
- height - Variable in class org.openpatch.scratch.tiled.MapObject
-
The height of the map object.
- height - Variable in class org.openpatch.scratch.tiled.TilesetImage
- height() - Method in record class org.openpatch.scratch.Bounds
-
Returns the value of the
heightrecord component. - height() - Method in record class org.openpatch.scratch.extension.ExtensionContext.DecodedImage
-
Returns the value of the
heightrecord component. - HELP - Enum constant in enum class org.openpatch.scratch.KeyCode
- hide() - Method in class org.openpatch.scratch.Sprite
-
Hides the sprite: it is not drawn, cannot be touched and cannot be clicked.
- hide() - Method in class org.openpatch.scratch.Text
-
Hides the text.
- hideLayer(String) - Method in class org.openpatch.scratch.tiled.TiledMap
-
Stops drawing a tile layer shown with
TiledMap.showLayer(String, Layer). - hideVariable(String) - Method in class org.openpatch.scratch.Sprite
- hideVariable(String) - Method in class org.openpatch.scratch.Stage
- HOME - Enum constant in enum class org.openpatch.scratch.KeyCode
- HONEYDEW - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Honeydew.
- HOT_PINK - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Hot Pink.
- HtmlColor - Class in org.openpatch.scratch
-
Provides predefined HTML colors as Color objects.
I
- I - Enum constant in enum class org.openpatch.scratch.KeyCode
- id - Variable in class org.openpatch.scratch.tiled.MapObject
-
The unique identifier of the map object.
- id() - Method in class org.openpatch.scratch.drawing.DrawingExtension
- id() - Method in interface org.openpatch.scratch.extension.Extension
-
A short unique id such as
"tiled", used in messages. - id() - Method in class org.openpatch.scratch.gamepad.GamepadExtension
- id() - Method in class org.openpatch.scratch.recorder.RecorderExtension
- id() - Method in class org.openpatch.scratch.save.SaveExtension
- id() - Method in class org.openpatch.scratch.tiled.TiledExtension
- ifOnEdgeBounce() - Method in class org.openpatch.scratch.Sprite
-
Turns around when touching an edge of the stage and moves back inside, as in Scratch.
- image(String, double, double) - Method in class org.openpatch.scratch.drawing.Drawing
-
An image at its own size, centred on a point.
- image(String, double, double, double, double) - Method in class org.openpatch.scratch.drawing.Drawing
-
An image stretched to a size, centred on a point.
- imageHeight(String) - Method in class org.openpatch.scratch.drawing.Drawing
- imageHeight(String) - Method in class org.openpatch.scratch.extension.Canvas
- imageWidth(String) - Method in class org.openpatch.scratch.drawing.Drawing
- imageWidth(String) - Method in class org.openpatch.scratch.extension.Canvas
- INDIAN_RED - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Indian Red.
- INDIGO - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Indigo.
- input(ExtensionContext.InputKey) - Method in interface org.openpatch.scratch.extension.ExtensionContext
-
This batch's copy of a slot of the input snapshot.
- INSERT - Enum constant in enum class org.openpatch.scratch.KeyCode
- install(ExtensionContext) - Method in class org.openpatch.scratch.drawing.DrawingExtension
-
Every layer gets a drawer that lets the stage's visible drawing sprites of that layer draw, back to front.
- install(ExtensionContext) - Method in interface org.openpatch.scratch.extension.Extension
-
Adds the extension's hooks.
- install(ExtensionContext) - Method in class org.openpatch.scratch.gamepad.GamepadExtension
- install(ExtensionContext) - Method in class org.openpatch.scratch.recorder.RecorderExtension
-
Hands every drawn frame to the recorders that are recording; frames are read back only then.
- install(ExtensionContext) - Method in class org.openpatch.scratch.tiled.TiledExtension
-
Every layer of a stage draws its shown map layers, only the part the camera shows.
- intersects(Bounds) - Method in record class org.openpatch.scratch.Bounds
- intersects(Shape) - Method in class org.openpatch.scratch.Shape
- interval(double) - Method in class org.openpatch.scratch.Timer
-
Alternates: true for a number of seconds, then false for as long, and so on.
- interval(double, double) - Method in class org.openpatch.scratch.Timer
-
Alternates: true for
onseconds, then false foroffseconds, and so on. - isActive() - Static method in class org.openpatch.scratch.Launcher
-
Whether the window has to run on the first thread.
- isActive(String) - Method in class org.openpatch.scratch.Shaders
- isAnimationPlayed() - Method in class org.openpatch.scratch.Sprite
- isAsking() - Method in class org.openpatch.scratch.Sprite
- isAsking() - Method in class org.openpatch.scratch.Stage
- isButtonPressed(int, GamepadButton) - Static method in class org.openpatch.scratch.gamepad.Gamepad
-
Whether the player's controller has the button down.
- isButtonPressed(GamepadButton) - Static method in class org.openpatch.scratch.gamepad.Gamepad
-
Whether any controller has the button down.
- isClone() - Method in class org.openpatch.scratch.Sprite
- isColorTouchingColor(Color, Color) - Method in class org.openpatch.scratch.Sprite
-
Whether a colour of the sprite touches a colour on the stage, like Scratch's "color is touching color".
- isConnected() - Static method in class org.openpatch.scratch.gamepad.Gamepad
-
Whether any controller is connected.
- isConnected(int) - Static method in class org.openpatch.scratch.gamepad.Gamepad
-
Whether a controller sits in the player's slot.
- isDebug() - Method in class org.openpatch.scratch.Window
- isDown() - Method in class org.openpatch.scratch.Pen
- isGliding() - Method in class org.openpatch.scratch.Sprite
- isKeyPressed(KeyCode) - Method in class org.openpatch.scratch.Sprite
- isKeyPressed(KeyCode) - Method in class org.openpatch.scratch.Stage
- isLoading() - Method in interface org.openpatch.scratch.extension.ExtensionContext
- isMouseDown() - Method in class org.openpatch.scratch.Sprite
- isMouseDown() - Method in class org.openpatch.scratch.Stage
- isPaused() - Method in class org.openpatch.scratch.Window
- isPixelArt() - Static method in class org.openpatch.scratch.Window
- isPlaying() - Method in class org.openpatch.scratch.SoundPlayback
- isSmoothPixelArt() - Static method in class org.openpatch.scratch.Window
- isSoundPlaying(String) - Method in class org.openpatch.scratch.Sprite
- isSoundPlaying(String) - Method in class org.openpatch.scratch.Stage
- isTouchingColor(double, double, double) - Method in class org.openpatch.scratch.Sprite
- isTouchingColor(Color) - Method in class org.openpatch.scratch.Sprite
-
Whether the sprite touches a colour: a painted pixel of the sprite lies over that colour, as the stage shows it now (backdrop, stage colour, pen strokes, stamps and other sprites with their effects; not texts, shaders or the UI layer).
- isTouchingEdge() - Method in class org.openpatch.scratch.Sprite
- isTouchingMousePointer() - Method in class org.openpatch.scratch.Sprite
- isTouchingSprite(Class) - Method in class org.openpatch.scratch.Sprite
- isTouchingSprite(Sprite) - Method in class org.openpatch.scratch.Sprite
- isTransitioning() - Method in class org.openpatch.scratch.Window
- isVisible() - Method in class org.openpatch.scratch.Sprite
- isVisible() - Method in class org.openpatch.scratch.Text
- IVORY - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Ivory.
J
K
- K - Enum constant in enum class org.openpatch.scratch.KeyCode
- key() - Method in record class org.openpatch.scratch.extension.ExtensionContext.KeyEvent
-
Returns the value of the
keyrecord component. - KeyCode - Enum Class in org.openpatch.scratch
-
Key codes for keyboard input handling.
- KeyEvent(KeyCode, boolean) - Constructor for record class org.openpatch.scratch.extension.ExtensionContext.KeyEvent
-
Creates an instance of a
KeyEventrecord class. - KHAKI - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Khaki.
- kind() - Method in record class org.openpatch.scratch.extension.ExtensionContext.MouseEvent
-
Returns the value of the
kindrecord component. - KP_DOWN - Enum constant in enum class org.openpatch.scratch.KeyCode
- KP_LEFT - Enum constant in enum class org.openpatch.scratch.KeyCode
- KP_RIGHT - Enum constant in enum class org.openpatch.scratch.KeyCode
- KP_UP - Enum constant in enum class org.openpatch.scratch.KeyCode
L
- L - Enum constant in enum class org.openpatch.scratch.KeyCode
- Launcher - Class in org.openpatch.scratch
-
Starts a program so that its window runs on the process's first thread, which macOS requires (with
-XstartOnFirstThread); the program'smainruns on a second thread. - LAVENDER - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Lavender.
- LAVENDER_BLUSH - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Lavender Blush.
- LAWN_GREEN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Lawn Green.
- Layer - Enum Class in org.openpatch.scratch
-
One of the four layers a stage draws, from back to front, after its backdrop.
- LearnerError(Throwable, StackTraceElement) - Constructor for record class org.openpatch.scratch.extension.ExtensionContext.LearnerError
-
Creates an instance of a
LearnerErrorrecord class. - learnerFrame() - Method in record class org.openpatch.scratch.extension.ExtensionContext.LearnerError
-
Returns the value of the
learnerFramerecord component. - LEFT - Enum constant in enum class org.openpatch.scratch.gamepad.GamepadStick
-
The left stick.
- LEFT - Enum constant in enum class org.openpatch.scratch.gamepad.GamepadTrigger
-
The left trigger (L2).
- LEFT - Enum constant in enum class org.openpatch.scratch.KeyCode
- LEFT - Enum constant in enum class org.openpatch.scratch.MouseCode
-
Represents the left mouse button.
- LEFT - Enum constant in enum class org.openpatch.scratch.TextAlign
-
Its left edge at its position.
- LEFT_BUMPER - Enum constant in enum class org.openpatch.scratch.gamepad.GamepadButton
-
The bumper above the left trigger (L1).
- LEFT_RIGHT - Enum constant in enum class org.openpatch.scratch.RotationStyle
-
Sprite can only face left or right
- LEFT_STICK - Enum constant in enum class org.openpatch.scratch.gamepad.GamepadButton
-
Pressing the left stick into the pad (L3).
- LEMON_CHIFFON - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Lemon Chiffon.
- length() - Method in class org.openpatch.scratch.Vector2
-
Calculates the length of the vector.
- lengthSq() - Method in class org.openpatch.scratch.Vector2
-
Calculates the squared length of the vector.
- lerp(double, double, double) - Static method in class org.openpatch.scratch.Operators
-
Calculates a number between two numbers at a specific increment.
- LIGHT_BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Light Blue.
- LIGHT_CORAL - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Light Coral.
- LIGHT_CYAN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Light Cyan.
- LIGHT_GOLDENROD_YELLOW - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Light Goldenrod Yellow.
- LIGHT_GRAY - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Light Gray.
- LIGHT_GREEN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Light Green.
- LIGHT_PINK - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Light Pink.
- LIGHT_SALMON - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Light Salmon.
- LIGHT_SEA_GREEN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Light Sea Green.
- LIGHT_SKY_BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Light Sky Blue.
- LIGHT_SLATE_GRAY - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Light Slate Gray.
- LIGHT_STEEL_BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Light Steel Blue.
- LIGHT_YELLOW - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Light Yellow.
- LIME - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Lime.
- LIME_GREEN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Lime Green.
- LINEN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Linen.
- lnOf(double) - Static method in class org.openpatch.scratch.Operators
-
ln is "natural log." It figures out how many times e would have to be multiplied by itself to get the value.
- load(String, Class) - Static method in class org.openpatch.scratch.save.File
-
Loads an object of the specified class from a file at the given path.
- loadOrCreate(String, Class) - Static method in class org.openpatch.scratch.save.File
-
Loads an object of the specified class from a file at the given path, or creates a new one if the file does not exist.
- loadOrDefault(Supplier) - Method in class org.openpatch.scratch.save.SaveData
-
Returns defaults only when the file is missing.
- logOf(double) - Static method in class org.openpatch.scratch.Operators
-
"Log" is short for "logarithm." The log function figures out how many times 10 must be multiplied by itself to get the value.
M
- M - Enum constant in enum class org.openpatch.scratch.KeyCode
- MAGENTA - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Magenta.
- main(String[]) - Static method in class org.openpatch.scratch.Launcher
- MAIN - Enum constant in enum class org.openpatch.scratch.Layer
-
Where sprites are unless they are moved.
- map(double, double, double, double, double) - Static method in class org.openpatch.scratch.Operators
-
Re-maps a number from one range to another.
In the first example above, the number 25 is converted from a value in the range of 0 to 100 into a value that ranges from the left edge of the window (0) to the right edge (width).
As shown in the second example, numbers outside the range are not clamped to the minimum and maximum parameters values, because out-of-range values are often intentional and useful. - MapObject - Class in org.openpatch.scratch.tiled
-
Represents a map object with various properties such as dimensions, position, visibility, and type.
- MapObject() - Constructor for class org.openpatch.scratch.tiled.MapObject
- MAROON - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Maroon.
- max(double...) - Static method in class org.openpatch.scratch.Operators
-
Determines the largest value in a sequence of numbers, and then returns that value.
- max(int...) - Static method in class org.openpatch.scratch.Operators
-
Determines the largest value in a sequence of numbers, and then returns that value.
- MEDIUM_AQUAMARINE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Medium Aquamarine.
- MEDIUM_BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Medium Blue.
- MEDIUM_ORCHID - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Medium Orchid.
- MEDIUM_PURPLE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Medium Purple.
- MEDIUM_SEA_GREEN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Medium Sea Green.
- MEDIUM_SLATE_BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Medium Slate Blue.
- MEDIUM_SPRING_GREEN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Medium Spring Green.
- MEDIUM_TURQUOISE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Medium Turquoise.
- MEDIUM_VIOLET_RED - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Medium Violet Red.
- META - Enum constant in enum class org.openpatch.scratch.KeyCode
- MIDNIGHT_BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Midnight Blue.
- min(double...) - Static method in class org.openpatch.scratch.Operators
-
Determines the smallest value in a sequence of numbers, and then returns that value.
- min(int...) - Static method in class org.openpatch.scratch.Operators
-
Determines the smallest value in a sequence of numbers, and then returns that value.
- MINT_CREAM - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Mint Cream.
- MINUS - Enum constant in enum class org.openpatch.scratch.KeyCode
- MISTY_ROSE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Misty Rose.
- MOCCASIN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Moccasin.
- mod(double, double) - Static method in class org.openpatch.scratch.Operators
-
"mod" is an abbreviation for "modulo".
- mod(int, int) - Static method in class org.openpatch.scratch.Operators
-
"mod" is an abbreviation for "modulo".
- MouseCode - Enum Class in org.openpatch.scratch
-
The
MouseCodeenum represents the different mouse buttons that can be used. - MouseEvent(ExtensionContext.MouseEvent.Kind, MouseCode, double, double, double) - Constructor for record class org.openpatch.scratch.extension.ExtensionContext.MouseEvent
-
Creates an instance of a
MouseEventrecord class. - move(double) - Method in class org.openpatch.scratch.Sprite
-
Moves forward in the sprite's direction.
- MOVE - Enum constant in enum class org.openpatch.scratch.extension.ExtensionContext.MouseEvent.Kind
- multiply(double) - Method in class org.openpatch.scratch.Vector2
-
Multiplies a scalar and return the result.
- MULTIPLY - Enum constant in enum class org.openpatch.scratch.KeyCode
N
- N - Enum constant in enum class org.openpatch.scratch.KeyCode
- name - Variable in class org.openpatch.scratch.tiled.MapObject
-
The name of the map object.
- name - Variable in class org.openpatch.scratch.tiled.Property
-
The name of the property.
- name() - Method in class org.openpatch.scratch.drawing.DrawingExtension
- name() - Method in interface org.openpatch.scratch.extension.Extension
-
A name for people, such as
"Tiled maps". - name() - Method in class org.openpatch.scratch.gamepad.GamepadExtension
- name() - Method in class org.openpatch.scratch.recorder.RecorderExtension
- name() - Method in class org.openpatch.scratch.save.SaveExtension
- name() - Method in class org.openpatch.scratch.tiled.TiledExtension
- NAVAJO_WHITE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Navajo White.
- NAVY - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Navy.
- next() - Method in class org.openpatch.scratch.Shaders
-
Uses the next shader alone.
- nextBackdrop() - Method in class org.openpatch.scratch.Stage
-
Switches to the next backdrop, after the last to the first.
- nextCostume() - Method in class org.openpatch.scratch.Sprite
-
Switches to the next costume, after the last one to the first.
- nextFont() - Method in class org.openpatch.scratch.Text
-
Switches to the next font added, after the last to the first.
- noClip() - Method in class org.openpatch.scratch.drawing.Drawing
-
Draws everywhere again.
- noClip() - Method in class org.openpatch.scratch.extension.Canvas
-
Draws everywhere again.
- noise(double) - Static method in class org.openpatch.scratch.Random
-
Returns the Open Simplex noise value at specified coordinates
- noise(double, double) - Static method in class org.openpatch.scratch.Random
-
Returns the Open Simplex noise value at specified coordinates
- noise(double, double, double) - Static method in class org.openpatch.scratch.Random
-
Returns the Open Simplex noise value at specified coordinates
- noiseSeed(long) - Static method in class org.openpatch.scratch.Random
-
Sets the seed for the noise method.
- normalVector() - Method in class org.openpatch.scratch.Vector2
-
Returns the normal vector, which is perpendicular to the vector.
- NUM_LOCK - Enum constant in enum class org.openpatch.scratch.KeyCode
- NUMPAD_0 - Enum constant in enum class org.openpatch.scratch.KeyCode
- NUMPAD_1 - Enum constant in enum class org.openpatch.scratch.KeyCode
- NUMPAD_2 - Enum constant in enum class org.openpatch.scratch.KeyCode
- NUMPAD_3 - Enum constant in enum class org.openpatch.scratch.KeyCode
- NUMPAD_4 - Enum constant in enum class org.openpatch.scratch.KeyCode
- NUMPAD_5 - Enum constant in enum class org.openpatch.scratch.KeyCode
- NUMPAD_6 - Enum constant in enum class org.openpatch.scratch.KeyCode
- NUMPAD_7 - Enum constant in enum class org.openpatch.scratch.KeyCode
- NUMPAD_8 - Enum constant in enum class org.openpatch.scratch.KeyCode
- NUMPAD_9 - Enum constant in enum class org.openpatch.scratch.KeyCode
O
- O - Enum constant in enum class org.openpatch.scratch.KeyCode
- of(String) - Static method in class org.openpatch.scratch.Pixels
-
The pixels of an image file.
- of(String, Supplier, BiConsumer) - Static method in class org.openpatch.scratch.extension.ExtensionContext.InputKey
- of(Stage) - Static method in class org.openpatch.scratch.Pixels
-
The stage's pixels as they are now.
- OLD_LACE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Old Lace.
- OLIVE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Olive.
- OLIVE_DRAB - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Olive Drab.
- onExit(Runnable) - Method in interface org.openpatch.scratch.extension.ExtensionContext
-
At the end of the program, after
whenExits(). - onInputPoll(Consumer) - Method in interface org.openpatch.scratch.extension.ExtensionContext
-
Once per batch of ticks, on the window thread (the one that started GLFW): poll devices into the snapshot.
- onKey(Consumer) - Method in interface org.openpatch.scratch.extension.ExtensionContext
-
Every key press and release, before learner code sees it; observe only.
- onLearnerError(Consumer) - Method in interface org.openpatch.scratch.extension.ExtensionContext
-
A learner exception stopped the game.
- onMouse(Consumer) - Method in interface org.openpatch.scratch.extension.ExtensionContext
-
Every mouse event, before learner code sees it; observe only.
- onStageCreated(Consumer) - Method in interface org.openpatch.scratch.extension.ExtensionContext
-
A stage was made (on the thread that made it, usually the game thread or main).
- onStageDisposed(Consumer) - Method in interface org.openpatch.scratch.extension.ExtensionContext
-
A stage stopped being shown.
- OPEN_BRACKET - Enum constant in enum class org.openpatch.scratch.KeyCode
- Operators - Class in org.openpatch.scratch
-
The Operators class provides a collection of static methods for performing various mathematical operations.
- ORANGE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Orange.
- ORANGE_RED - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Orange Red.
- ORCHID - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Orchid.
- org.openpatch.scratch - package org.openpatch.scratch
- org.openpatch.scratch.drawing - package org.openpatch.scratch.drawing
-
Sprites that draw themselves with shapes and images instead of a costume (
DrawingSprite), and text made from image glyphs (BitmapText). - org.openpatch.scratch.extension - package org.openpatch.scratch.extension
-
The public extension API: what an extension jar uses to add to Scratch for Java without touching its internals.
- org.openpatch.scratch.gamepad - package org.openpatch.scratch.gamepad
-
Controller support: up to four gamepads, polled every tick.
- org.openpatch.scratch.recorder - package org.openpatch.scratch.recorder
-
Recording the stage as an animated GIF (
GifRecorder). - org.openpatch.scratch.save - package org.openpatch.scratch.save
-
Saving and loading: a game's progress in the user's data folder (
SaveData) and objects as JSON files (File). - org.openpatch.scratch.tiled - package org.openpatch.scratch.tiled
-
Maps made with the Tiled map editor (
.tmx, tilesets in.tsx): tile layers drawn in the stage's layers, objects with their properties and shapes, animated tiles.
P
- P - Enum constant in enum class org.openpatch.scratch.KeyCode
- PAGE_DOWN - Enum constant in enum class org.openpatch.scratch.KeyCode
- PAGE_UP - Enum constant in enum class org.openpatch.scratch.KeyCode
- PALE_GOLDENROD - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Pale Goldenrod.
- PALE_GREEN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Pale Green.
- PALE_TURQUOISE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Pale Turquoise.
- PALE_VIOLET_RED - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Pale Violet Red.
- PAPAYA_WHIP - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Papaya Whip.
- path() - Method in class org.openpatch.scratch.save.SaveData
-
Returns the absolute save file path for desktop tools and Steam Auto-Cloud.
- pause() - Method in class org.openpatch.scratch.Window
-
Pauses the game: no ticks run; keys and the mouse still reach the stage and sprites.
- PAUSE - Enum constant in enum class org.openpatch.scratch.KeyCode
- PEACH_PUFF - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Peach Puff.
- Pen - Class in org.openpatch.scratch
-
A pen draws lines onto the canvas of its layer, like Scratch's pen.
- Pen() - Constructor for class org.openpatch.scratch.Pen
-
A pen of your own, at (0, 0); add it to a stage with
stage.add(pen). - PERIOD - Enum constant in enum class org.openpatch.scratch.KeyCode
- PERU - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Peru.
- pickRandom(int, int) - Method in class org.openpatch.scratch.Sprite
-
A random whole number between two numbers, both included.
- pickRandom(int, int) - Method in class org.openpatch.scratch.Stage
-
A random whole number between two numbers, both included.
- PINK - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Pink.
- Pixels - Class in org.openpatch.scratch
-
The pixels of the stage or of an image file, to read colours from.
- PLAIN - Enum constant in enum class org.openpatch.scratch.TextStyle
- playAnimation(String) - Method in class org.openpatch.scratch.Sprite
-
Plays an animation, over and over.
- playAnimation(String, boolean) - Method in class org.openpatch.scratch.Sprite
-
Plays an animation; call it every tick.
- PLAYERS - Static variable in class org.openpatch.scratch.gamepad.GamepadState
-
The player slots, 1 to 4 in joystick-slot order.
- playSound(String) - Method in class org.openpatch.scratch.Sprite
-
Starts a sound, like Scratch's "start sound"; a sound that is still playing is not started again.
- playSound(String) - Method in class org.openpatch.scratch.Stage
-
Starts a sound, like Scratch's "start sound"; a sound that is still playing is not started again.
- playSoundCopy(String, double) - Method in class org.openpatch.scratch.Sprite
-
Starts another copy of a sound, which plays alongside the others: for shots, steps, coins.
- playSoundCopy(String, double) - Method in class org.openpatch.scratch.Stage
-
Starts another copy of a sound, which plays alongside the others: for shots, steps, coins.
- PLUM - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Plum.
- point - Variable in class org.openpatch.scratch.tiled.MapObject
-
An object representing a point.
- pointTowards(Sprite) - Method in class org.openpatch.scratch.Sprite
- pointTowards(Vector2) - Method in class org.openpatch.scratch.Sprite
-
Points towards a position.
- pointTowardsMousePointer() - Method in class org.openpatch.scratch.Sprite
-
Points towards the mouse pointer.
- polygon(double[], double[], Color) - Method in class org.openpatch.scratch.drawing.Drawing
-
A filled polygon.
- Polygon - Class in org.openpatch.scratch
-
A polygon given by its corners, concave ones included.
- Polygon() - Constructor for class org.openpatch.scratch.Polygon
-
A polygon without corners yet; add them with
Polygon.addPoint(double, double). - Polygon(double[], double[]) - Constructor for class org.openpatch.scratch.Polygon
- POWDER_BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Powder Blue.
- PRESS - Enum constant in enum class org.openpatch.scratch.extension.ExtensionContext.MouseEvent.Kind
- pressed() - Method in record class org.openpatch.scratch.extension.ExtensionContext.KeyEvent
-
Returns the value of the
pressedrecord component. - pressed(int, GamepadButton) - Method in class org.openpatch.scratch.gamepad.GamepadState
-
Whether the player's controller has the button down right now.
- previousBackdrop() - Method in class org.openpatch.scratch.Stage
-
Switches to the previous backdrop, before the first to the last.
- previousCostume() - Method in class org.openpatch.scratch.Sprite
-
Switches to the previous costume, before the first one to the last.
- PRINT_SCREEN - Enum constant in enum class org.openpatch.scratch.KeyCode
- properties - Variable in class org.openpatch.scratch.tiled.MapObject
-
A list of properties associated with the map object.
- properties - Variable in class org.openpatch.scratch.tiled.Property
-
A class-typed property (Tiled 1.8+) holds its members as nested properties.
- Property - Class in org.openpatch.scratch.tiled
-
The Property class represents a property of a Tiled object.
- Property() - Constructor for class org.openpatch.scratch.tiled.Property
- PURPLE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Purple.
Q
- Q - Enum constant in enum class org.openpatch.scratch.KeyCode
- QUOTE - Enum constant in enum class org.openpatch.scratch.KeyCode
R
- R - Enum constant in enum class org.openpatch.scratch.KeyCode
- random() - Static method in class org.openpatch.scratch.Random
-
Returns a random double between 0 and 1.
- random(double) - Static method in class org.openpatch.scratch.Random
-
Returns a random double between 0 and max.
- random(double, double) - Static method in class org.openpatch.scratch.Random
-
Returns a random double between min and max.
- Random - Class in org.openpatch.scratch
-
The Random class provides various methods for generating random values and noise.
- randomBackdrop() - Method in class org.openpatch.scratch.Stage
-
Switches to a random backdrop other than the current one (if there is another).
- randomInt(int) - Static method in class org.openpatch.scratch.Random
-
Returns a random integer between 0 and max.
- randomInt(int, int) - Static method in class org.openpatch.scratch.Random
-
Returns a random integer between min and max.
- randomPosition() - Static method in class org.openpatch.scratch.Random
-
Returns a random position with respect to the width of the window.
- randomSeed(long) - Static method in class org.openpatch.scratch.Random
-
Sets the seed for the random method.
- randomVector2() - Static method in class org.openpatch.scratch.Random
-
Returns a random unit vector
- randomX() - Static method in class org.openpatch.scratch.Random
-
Return a random x coordinate with respect to the width of the window.
- randomY() - Static method in class org.openpatch.scratch.Random
-
Return a random y coordinate with respect to the width of the window.
- read(GamepadState) - Method in interface org.openpatch.scratch.gamepad.GamepadSource
-
Writes the current state of every controller into
into, which starts out empty: poll everything, then fill. - RecorderExtension - Class in org.openpatch.scratch.recorder
-
Registers the recorder extension; found through ServiceLoader, learners never see it.
- RecorderExtension() - Constructor for class org.openpatch.scratch.recorder.RecorderExtension
- rectangle(double, double, double, double, Color) - Method in class org.openpatch.scratch.drawing.Drawing
-
A filled rectangle centred on a point.
- Rectangle - Class in org.openpatch.scratch
-
A rectangle along the axes.
- Rectangle(double, double, double, double) - Constructor for class org.openpatch.scratch.Rectangle
- RED - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Red.
- registerImageFormat(String, ExtensionContext.ImageDecoder) - Method in interface org.openpatch.scratch.extension.ExtensionContext
-
Images whose name ends in
suffix(e.g. - RELEASE - Enum constant in enum class org.openpatch.scratch.extension.ExtensionContext.MouseEvent.Kind
- remove() - Method in class org.openpatch.scratch.Sprite
-
Removes the sprite from its stage.
- remove() - Method in class org.openpatch.scratch.Text
-
Removes the text from its stage.
- remove(Class) - Method in class org.openpatch.scratch.Stage
-
Removes every sprite of a class (subclasses included).
- remove(Pen) - Method in class org.openpatch.scratch.Stage
- remove(Sprite) - Method in class org.openpatch.scratch.Stage
-
Removes a sprite.
- remove(Text) - Method in class org.openpatch.scratch.Stage
- removeAll() - Method in class org.openpatch.scratch.Stage
-
Removes every sprite, text and pen: an empty stage (backdrops and what was drawn stay).
- requires() - Method in class org.openpatch.scratch.drawing.DrawingExtension
-
First-party extensions are released together with the core.
- requires() - Method in interface org.openpatch.scratch.extension.Extension
-
The core versions this extension works with:
"7"means any 7.x,"7.1"7.1 or newer,"7.1.2"7.1.2 or newer, always below the next major version. - requires() - Method in class org.openpatch.scratch.gamepad.GamepadExtension
-
First-party extensions are released together with the core.
- requires() - Method in class org.openpatch.scratch.recorder.RecorderExtension
-
First-party extensions are released together with the core.
- requires() - Method in class org.openpatch.scratch.save.SaveExtension
-
First-party extensions are released together with the core.
- requires() - Method in class org.openpatch.scratch.tiled.TiledExtension
-
First-party extensions are released together with the core.
- reset() - Method in class org.openpatch.scratch.Shaders
-
Uses no shader.
- reset() - Method in class org.openpatch.scratch.Timer
-
Starts the timer again from 0, and every method below with it.
- resetAnimation() - Method in class org.openpatch.scratch.Sprite
-
Starts the current animation from its first frame again.
- resetZoom() - Method in class org.openpatch.scratch.Camera
-
Back to zoom 100.
- resume() - Method in class org.openpatch.scratch.Window
-
Goes on after
Window.pause(). - reverse() - Method in class org.openpatch.scratch.Vector2
-
Reverses a vector and returns the result.
- RIGHT - Enum constant in enum class org.openpatch.scratch.gamepad.GamepadStick
-
The right stick.
- RIGHT - Enum constant in enum class org.openpatch.scratch.gamepad.GamepadTrigger
-
The right trigger (R2).
- RIGHT - Enum constant in enum class org.openpatch.scratch.KeyCode
- RIGHT - Enum constant in enum class org.openpatch.scratch.MouseCode
-
Represents the right mouse button.
- RIGHT - Enum constant in enum class org.openpatch.scratch.TextAlign
-
Its right edge at its position.
- RIGHT_BUMPER - Enum constant in enum class org.openpatch.scratch.gamepad.GamepadButton
-
The bumper above the right trigger (R1).
- RIGHT_STICK - Enum constant in enum class org.openpatch.scratch.gamepad.GamepadButton
-
Pressing the right stick into the pad (R3).
- ROSY_BROWN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Rosy Brown.
- rotate(double, double, double) - Method in class org.openpatch.scratch.Shape
-
Turns the shape about a point, from the x axis towards the y axis (anticlockwise when y points up).
- rotateBy(double) - Method in class org.openpatch.scratch.Vector2
-
Rotates the vector by an angle and returns the result.
- rotateTo(double) - Method in class org.openpatch.scratch.Vector2
-
Rotates the vector to a given angle and returns the result.
- rotation - Variable in class org.openpatch.scratch.tiled.MapObject
-
The rotation angle of the map object.
- RotationStyle - Enum Class in org.openpatch.scratch
-
The RotationStyle enum represents the different rotation styles that a sprite can have in Scratch.
- round(double) - Static method in class org.openpatch.scratch.Operators
-
The standard rules of rounding are followed; decimals that are .5 or higher are rounded up, whereas decimals less than .5 are rounded down.
- round(double, int) - Static method in class org.openpatch.scratch.Operators
-
Rounds a number to a specified number of decimal places.
- ROYAL_BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Royal Blue.
- run() - Method in class org.openpatch.scratch.Sprite
-
Runs every tick, 60 times a second of game time.
- run() - Method in class org.openpatch.scratch.Stage
-
Runs every tick before the sprites'
run(). - runOnFirstThread(Runnable) - Static method in class org.openpatch.scratch.Launcher
-
Hands the window loop to the first thread; it does not return before the program ends.
- runOnGameThread(Runnable) - Method in interface org.openpatch.scratch.extension.ExtensionContext
-
Runs a task at the start of the next tick, before input.
S
- S - Enum constant in enum class org.openpatch.scratch.KeyCode
- SADDLE_BROWN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Saddle Brown.
- SALMON - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Salmon.
- SANDY_BROWN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Sandy Brown.
- save(String, T) - Static method in class org.openpatch.scratch.save.File
-
Saves the given object as a JSON file at the specified path.
- save(T) - Method in class org.openpatch.scratch.save.SaveData
-
Serializes before touching the save, flushes a sibling temporary file, and replaces the save through an atomic rename.
- SaveData<T> - Class in org.openpatch.scratch.save
-
Saves a game's progress as JSON independently of its installation directory.
- SaveData(String, String, Class) - Constructor for class org.openpatch.scratch.save.SaveData
-
Selects a game's save slot without creating a file or opening a database.
- SaveExtension - Class in org.openpatch.scratch.save
-
Registers the save extension; found through ServiceLoader, learners never see it.
- SaveExtension() - Constructor for class org.openpatch.scratch.save.SaveExtension
- savePng(Path) - Method in interface org.openpatch.scratch.extension.ExtensionContext.Frame
- say(String) - Method in class org.openpatch.scratch.Sprite
-
Shows a speech bubble until the sprite says something else; an empty text removes it.
- say(String, double) - Method in class org.openpatch.scratch.Sprite
-
Shows a speech bubble for a number of seconds of game time.
- scale(double, double) - Method in class org.openpatch.scratch.Shape
- ScratchException - Exception Class in org.openpatch.scratch
-
Thrown when a program cannot go on, for example because a costume or a sound could not be loaded.
- ScratchException(String) - Constructor for exception class org.openpatch.scratch.ScratchException
-
Creates the exception.
- SCROLL_LOCK - Enum constant in enum class org.openpatch.scratch.KeyCode
- SEA_GREEN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Sea Green.
- SEASHELL - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Seashell.
- SEMICOLON - Enum constant in enum class org.openpatch.scratch.KeyCode
- set(String, boolean) - Method in class org.openpatch.scratch.Shader
- set(String, double) - Method in class org.openpatch.scratch.Shader
- set(String, double[], int) - Method in class org.openpatch.scratch.Shader
-
An array uniform such as
uniform vec3 lights[100];. - set(String, double, double) - Method in class org.openpatch.scratch.Shader
- set(String, int) - Method in class org.openpatch.scratch.Shader
- set(String, Color) - Method in class org.openpatch.scratch.Shader
- set(String, Vector2) - Method in class org.openpatch.scratch.Shader
- setAlign(TextAlign) - Method in class org.openpatch.scratch.drawing.BitmapText
- setAlign(TextAlign) - Method in class org.openpatch.scratch.Text
- setAnimationFrame(int) - Method in class org.openpatch.scratch.Sprite
- setAnimationInterval(double) - Method in class org.openpatch.scratch.Sprite
- setBackgroundColor(double, double, double) - Method in class org.openpatch.scratch.Text
- setBackgroundColor(Color) - Method in class org.openpatch.scratch.Text
- setClassName(String) - Method in class org.openpatch.scratch.tiled.MapObject
-
Tiled 1.9 renamed an object's type to class; both end up in
MapObject.type(an explicit type wins). - setColor(double) - Method in class org.openpatch.scratch.Pen
-
Sets the colour by Scratch's colour number (hue) from 0 to 100, at full saturation and brightness, like Scratch's "set pen color to".
- setColor(double, double, double) - Method in class org.openpatch.scratch.Pen
- setColor(double, double, double) - Method in class org.openpatch.scratch.Stage
- setColor(Color) - Method in class org.openpatch.scratch.Pen
- setColor(Color) - Method in class org.openpatch.scratch.Stage
- setColorEffect(double) - Method in class org.openpatch.scratch.Sprite
-
Scratch's colour effect: shifts every colour of the costume around the colour wheel.
- setColorEffect(double) - Method in class org.openpatch.scratch.Stage
-
Scratch's colour effect on the backdrop: shifts its colours around the colour wheel (200 is all the way round).
- setConnected(int, boolean) - Method in class org.openpatch.scratch.gamepad.GamepadState
-
Puts a controller into the player's slot, or takes it out.
- setCursor(String) - Method in class org.openpatch.scratch.Stage
-
Shows an image instead of the mouse pointer while the mouse is over the stage.
- setCursor(String, int, int) - Method in class org.openpatch.scratch.Stage
-
Shows an image instead of the mouse pointer.
- setDebug(boolean) - Method in class org.openpatch.scratch.Window
-
Debug mode shows what its panel in the bottom right corner has ticked: hitboxes, positions, the mouse and camera, touching pairs, hidden sprites, the clones and the frame rate, and it lets
debug(…)print. - setDelay(int) - Method in class org.openpatch.scratch.recorder.GifEncoder
-
Sets the delay time between each frame, or changes it for subsequent frames (applies to last frame added).
- setDirection(double) - Method in class org.openpatch.scratch.Sprite
-
Points in a direction: 0 up, 90 right, 180 down, 270 left; other numbers go around.
- setDispose(int) - Method in class org.openpatch.scratch.recorder.GifEncoder
-
Sets the GIF frame disposal code for the last added frame and any subsequent frames.
- setFont(String) - Method in class org.openpatch.scratch.drawing.BitmapText
- setFont(String) - Method in class org.openpatch.scratch.Text
- setFrameRate(float) - Method in class org.openpatch.scratch.recorder.GifEncoder
-
Sets frame rate in frames per second.
- setGameSpeed(double) - Method in class org.openpatch.scratch.Window
-
How fast the game runs: 1 is normal, 2 twice as fast, 0.5 half as fast; up to 8.
- setHeight(double) - Method in class org.openpatch.scratch.Sprite
-
Draws the sprite this high; see
Sprite.setWidth(double). - setHitbox(Shape) - Method in class org.openpatch.scratch.Sprite
-
Sets the hitbox: the shape that counts for touching, in costume pixels (origin at the costume's top left corner, y down).
- setLayer(Layer) - Method in class org.openpatch.scratch.Pen
- setLayer(Layer) - Method in class org.openpatch.scratch.Sprite
-
Moves the sprite to another layer, in front of the sprites already there.
- setLayer(Layer) - Method in class org.openpatch.scratch.Text
-
Moves the text to another layer:
Layer.UIkeeps it in place when the camera moves; any other layer puts it into the world, in front of the foreground. - setLetterSpacing(double) - Method in class org.openpatch.scratch.drawing.BitmapText
- setLineSpacing(double) - Method in class org.openpatch.scratch.drawing.BitmapText
- setName(String) - Method in class org.openpatch.scratch.Shader
- setNineSlice(int, int, int, int) - Method in class org.openpatch.scratch.Sprite
-
Stretches only the middle of the costume when the sprite is drawn at its own width and height: the four corners keep their size (scaled with the sprite's size), the edges stretch along one side.
- setOpacity(double) - Method in class org.openpatch.scratch.extension.Canvas
- setPosition(double, double) - Method in class org.openpatch.scratch.Camera
-
Centres the camera on a world position.
- setPosition(double, double) - Method in class org.openpatch.scratch.Pen
-
Moves the pen, drawing a line from where it was if it is down.
- setPosition(double, double) - Method in class org.openpatch.scratch.Sprite
-
Goes to a position; with the pen down, it draws a line there.
- setPosition(double, double) - Method in class org.openpatch.scratch.Text
- setPosition(Vector2) - Method in class org.openpatch.scratch.Camera
-
Centres the camera on a world position.
- setPosition(Vector2) - Method in class org.openpatch.scratch.Pen
- setPosition(Vector2) - Method in class org.openpatch.scratch.Sprite
- setPosition(Vector2) - Method in class org.openpatch.scratch.Text
- setPressed(int, GamepadButton, boolean) - Method in class org.openpatch.scratch.gamepad.GamepadState
-
Sets one button of the player's controller.
- setQuality(int) - Method in class org.openpatch.scratch.recorder.GifEncoder
-
Sets quality of color quantization (conversion of images to the maximum 256 colors allowed by the GIF specification).
- setRepeat(int) - Method in class org.openpatch.scratch.recorder.GifEncoder
-
Sets the number of times the set of GIF frames should be played.
- setRotationCenter(double, double) - Method in class org.openpatch.scratch.Sprite
-
Sets the point of the costumes the sprite turns around and stands on, in costume pixels from the top left corner.
- setRotationStyle(RotationStyle) - Method in class org.openpatch.scratch.Sprite
- setSize(double) - Method in class org.openpatch.scratch.Pen
- setSize(double) - Method in class org.openpatch.scratch.Sprite
- setSpaceWidth(double) - Method in class org.openpatch.scratch.drawing.BitmapText
- setStage(Stage) - Method in class org.openpatch.scratch.Window
-
Shows a stage from the next tick on.
- setStick(int, GamepadStick, double, double) - Method in class org.openpatch.scratch.gamepad.GamepadState
-
Sets a stick of the player's controller; up is positive, as on the stage.
- setStrokeColor(double, double, double) - Method in class org.openpatch.scratch.Text
- setStrokeColor(Color) - Method in class org.openpatch.scratch.Text
- setStyle(TextStyle) - Method in class org.openpatch.scratch.Text
- setText(String) - Method in class org.openpatch.scratch.tiled.Property
-
Multi-line strings are written as the element's text instead of a value attribute.
- setTextColor(double, double, double) - Method in class org.openpatch.scratch.Text
- setTextColor(Color) - Method in class org.openpatch.scratch.Text
- setTextSize(double) - Method in class org.openpatch.scratch.Text
- setTint(double, double, double) - Method in class org.openpatch.scratch.Sprite
- setTint(Color) - Method in class org.openpatch.scratch.Sprite
-
Multiplies the costume by a colour: white leaves it as it is, red keeps only its red.
- setTint(Color) - Method in class org.openpatch.scratch.Stage
-
Multiplies the backdrop by a colour.
- setTransparency(double) - Method in class org.openpatch.scratch.Pen
- setTransparency(double) - Method in class org.openpatch.scratch.Sprite
-
Scratch's ghost effect.
- setTransparency(double) - Method in class org.openpatch.scratch.Stage
-
Scratch's ghost effect on the backdrop: the stage colour shows through.
- setTransparent(int) - Method in class org.openpatch.scratch.recorder.GifEncoder
-
Sets the transparent color for the last added frame and any subsequent frames.
- setTrigger(int, GamepadTrigger, double) - Method in class org.openpatch.scratch.gamepad.GamepadState
-
Sets a trigger of the player's controller, 0 (not at all) to 1 (fully).
- setVolume(double) - Method in class org.openpatch.scratch.SoundPlayback
- setVolume(double) - Method in class org.openpatch.scratch.Sprite
- setVolume(double) - Method in class org.openpatch.scratch.Stage
- setWidth(double) - Method in class org.openpatch.scratch.Sprite
-
Draws the sprite this wide, whatever its costume's width and size: for buttons, panels and platforms.
- setWidth(double) - Method in class org.openpatch.scratch.Text
- setX(double) - Method in class org.openpatch.scratch.Camera
- setX(double) - Method in class org.openpatch.scratch.Sprite
- setX(double) - Method in class org.openpatch.scratch.Text
- setY(double) - Method in class org.openpatch.scratch.Camera
- setY(double) - Method in class org.openpatch.scratch.Sprite
- setY(double) - Method in class org.openpatch.scratch.Text
- setZoom(double) - Method in class org.openpatch.scratch.Camera
-
Sets the zoom in percent: 200 shows everything twice as large, 50 half as large.
- setZoomLimit(double, double) - Method in class org.openpatch.scratch.Camera
-
Limits the zoom.
- Shader - Class in org.openpatch.scratch
-
A shader: a small program the graphics card runs for every pixel of a sprite (or of the whole stage) to change how it looks.
- Shaders - Class in org.openpatch.scratch
-
The shaders of a sprite or of the stage.
- Shape - Class in org.openpatch.scratch
-
A shape on the stage: a polygon, rectangle, circle, ellipse or triangle.
- SHIFT - Enum constant in enum class org.openpatch.scratch.KeyCode
- show() - Method in class org.openpatch.scratch.Sprite
-
Shows the sprite.
- show() - Method in class org.openpatch.scratch.Text
-
Shows the text.
- showLayer(String, Layer) - Method in class org.openpatch.scratch.tiled.TiledMap
-
Shows a tile layer of the map in a layer of the stage, drawn every frame from now on (only the tiles the camera shows).
- showText(String) - Method in class org.openpatch.scratch.drawing.BitmapText
- showText(String) - Method in class org.openpatch.scratch.Text
-
Shows the text with new words until it is changed or hidden.
- showText(String, double) - Method in class org.openpatch.scratch.Text
-
Shows the text for a number of seconds of game time, then hides it.
- showVariable(String, Supplier) - Method in class org.openpatch.scratch.Sprite
-
Shows a variable in a box at the top left of the stage, like a Scratch monitor; its value is read every frame.
- showVariable(String, Supplier) - Method in class org.openpatch.scratch.Stage
-
Shows a variable in a box at the top left of the stage, like a Scratch monitor; its value is read every frame.
- SIENNA - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Sienna.
- SILVER - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Silver.
- sinOf(double) - Static method in class org.openpatch.scratch.Operators
-
"sin" is an abbreviation for "sine." The sine of an angle is the ratio between the length of the side that is opposite (across) the triangle from it and the length of the hypotenuse (the side that is across from the right angle).
- SKY_BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Sky Blue.
- SLASH - Enum constant in enum class org.openpatch.scratch.KeyCode
- SLATE_BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Slate Blue.
- SLATE_GRAY - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Slate Gray.
- SLIDE_DOWN - Static variable in class org.openpatch.scratch.Transition
-
The new stage pushes the old one out downwards.
- SLIDE_LEFT - Static variable in class org.openpatch.scratch.Transition
-
The new stage pushes the old one out to the left.
- SLIDE_RIGHT - Static variable in class org.openpatch.scratch.Transition
-
The new stage pushes the old one out to the right.
- SLIDE_UP - Static variable in class org.openpatch.scratch.Transition
-
The new stage pushes the old one out upwards.
- snapshot() - Method in class org.openpatch.scratch.recorder.GifRecorder
-
Saves the next frame as a GIF of one frame.
- SNOW - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Snow.
- sortBy(Comparator) - Method in class org.openpatch.scratch.Stage
-
Draws and runs the sprites of each layer in the order a comparator gives, back to front.
- sortByY() - Method in class org.openpatch.scratch.Stage
-
Draws and runs the sprites of each layer sorted by their y position: lower sprites in front, as in a top-down game.
- SoundPlayback - Class in org.openpatch.scratch
-
One copy of a sound started with
playSoundCopy: it can be stopped or made louder or quieter while it plays, independently of other copies. - source - Variable in class org.openpatch.scratch.tiled.TilesetImage
- SPACE - Enum constant in enum class org.openpatch.scratch.KeyCode
- spawn(String, Class...) - Method in class org.openpatch.scratch.tiled.TiledMap
-
Creates a sprite for each object of a layer whose type is one of the given sprite classes, and adds it to the stage.
- SPEAK - Enum constant in enum class org.openpatch.scratch.TextStyle
- SPRING_GREEN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Spring Green.
- Sprite - Class in org.openpatch.scratch
-
A sprite: an object on the stage with costumes, a position and a direction, and code that runs every tick in
Sprite.run(), like a sprite and its scripts in Scratch. - Sprite() - Constructor for class org.openpatch.scratch.Sprite
-
A sprite without costumes.
- Sprite(String, String) - Constructor for class org.openpatch.scratch.Sprite
-
A sprite with one costume.
- sqrtOf(double) - Static method in class org.openpatch.scratch.Operators
-
"sqrt" is an abbreviation for "square root." A number that is squared is multiplied by itself.
- Stage - Class in org.openpatch.scratch
-
A stage: one screen of a program, with its backdrops, sprites, texts and pens, and code that runs every tick in
Stage.run(). - Stage() - Constructor for class org.openpatch.scratch.Stage
-
A stage the size of the window.
- stamp() - Method in class org.openpatch.scratch.Pen
-
Stamps the pen's sprite onto the pen's layer, like Scratch's "stamp" block.
- stamp() - Method in class org.openpatch.scratch.Sprite
-
Stamps the costume onto the canvas of the sprite's pen layer (behind the sprites unless the pen was moved): a picture of the sprite as it looks now, effects included, that stays.
- stamp(Layer) - Method in class org.openpatch.scratch.Sprite
-
Stamps the costume onto the canvas of a layer.
- start() - Method in class org.openpatch.scratch.recorder.GifRecorder
-
Starts recording from the next frame on.
- start(OutputStream) - Method in class org.openpatch.scratch.recorder.GifEncoder
-
Initiates GIF file creation on the given stream.
- start(String) - Method in class org.openpatch.scratch.recorder.GifEncoder
-
Initiates writing of a GIF file with the specified name.
- START - Enum constant in enum class org.openpatch.scratch.gamepad.GamepadButton
-
The small button right of the middle (Menu, Options, Start).
- STEEL_BLUE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Steel Blue.
- step() - Method in class org.openpatch.scratch.Window
-
While paused: runs exactly one tick.
- stickX(int, GamepadStick) - Method in class org.openpatch.scratch.gamepad.GamepadState
-
The stick's x position, −1 (left) to 1 (right), 0 at rest.
- stickY(int, GamepadStick) - Method in class org.openpatch.scratch.gamepad.GamepadState
-
The stick's y position, −1 (down) to 1 (up), 0 at rest.
- stop() - Method in class org.openpatch.scratch.recorder.GifRecorder
-
Stops recording and finishes the file.
- stop() - Method in class org.openpatch.scratch.SoundPlayback
-
Stops this copy.
- stopAllSounds() - Method in class org.openpatch.scratch.Sprite
-
Stops every sound this object started.
- stopAllSounds() - Method in class org.openpatch.scratch.Stage
-
Stops every sound this object started.
- stopSorting() - Method in class org.openpatch.scratch.Stage
-
Keeps the order the sprites have now and stops sorting them.
- stopSound(String) - Method in class org.openpatch.scratch.Sprite
- stopSound(String) - Method in class org.openpatch.scratch.Stage
- sub(Vector2) - Method in class org.openpatch.scratch.Vector2
-
Substracts another vector and returns the result
- SUBTRACT - Enum constant in enum class org.openpatch.scratch.KeyCode
- switchBackdrop(String) - Method in class org.openpatch.scratch.Stage
-
Switches to the backdrop with that name and tells the stage and every sprite (
whenBackdropSwitches); an unknown name changes nothing. - switchCostume(double) - Method in class org.openpatch.scratch.Sprite
-
Switches to a costume by number, counting from 0; numbers wrap around like Scratch's.
- switchCostume(String) - Method in class org.openpatch.scratch.Sprite
-
Switches to the costume with that name; an unknown name changes nothing.
- switchFont(String) - Method in class org.openpatch.scratch.Text
- switchTo(double) - Method in class org.openpatch.scratch.Shaders
- switchTo(String) - Method in class org.openpatch.scratch.Shaders
T
- T - Enum constant in enum class org.openpatch.scratch.KeyCode
- TAB - Enum constant in enum class org.openpatch.scratch.KeyCode
- TAN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Tan.
- tanOf(double) - Static method in class org.openpatch.scratch.Operators
-
"tan" is the abbreviation for "tangent." The tangent of an angle is the ratio between the length of the side adjacent to it and the side opposite of it.
- TEAL - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Teal.
- tenToThePowerOf(double) - Static method in class org.openpatch.scratch.Operators
-
The 10^ function multiplies 10 times itself the value number of times.
- Text - Class in org.openpatch.scratch
-
A text on the stage: plain, in a box, or in a speech or thought bubble.
- Text() - Constructor for class org.openpatch.scratch.Text
-
An empty plain text at (0, 0).
- Text(String, double, double, double) - Constructor for class org.openpatch.scratch.Text
-
A plain text.
- Text(String, double, double, double, TextStyle) - Constructor for class org.openpatch.scratch.Text
-
A text in a style.
- TextAlign - Enum Class in org.openpatch.scratch
-
Where a piece of text sits relative to its position.
- TextStyle - Enum Class in org.openpatch.scratch
-
The
TextStyleenum represents different styles of text that can be used. - think(String) - Method in class org.openpatch.scratch.Sprite
-
Shows a thought bubble until the sprite thinks something else; an empty text removes it.
- think(String, double) - Method in class org.openpatch.scratch.Sprite
-
Shows a thought bubble for a number of seconds of game time.
- THINK - Enum constant in enum class org.openpatch.scratch.TextStyle
- THISTLE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Thistle.
- TiledExtension - Class in org.openpatch.scratch.tiled
-
Registers the tiled extension; found through ServiceLoader, learners never see it.
- TiledExtension() - Constructor for class org.openpatch.scratch.tiled.TiledExtension
- TiledMap - Class in org.openpatch.scratch.tiled
-
A map made with the Tiled editor (TMX or TMJ): its tile layers are shown in the stage's layers and drawn every frame, its object layers can spawn sprites, its tiles carry properties and collision shapes.
- TiledMap(String) - Constructor for class org.openpatch.scratch.tiled.TiledMap
-
Loads map data without attaching it to a stage.
- TiledMap(String, Stage) - Constructor for class org.openpatch.scratch.tiled.TiledMap
-
Constructs a new TiledMap object.
- TilesetImage - Class in org.openpatch.scratch.tiled
- TilesetImage() - Constructor for class org.openpatch.scratch.tiled.TilesetImage
- Timer - Class in org.openpatch.scratch
-
A timer counting game time in seconds, like Scratch's timer: it stops while the game is paused and runs faster at a higher game speed, so it agrees with everything else that happens in ticks.
- Timer() - Constructor for class org.openpatch.scratch.Timer
-
A timer starting now.
- toARGB() - Method in class org.openpatch.scratch.Color
-
The colour packed into one int as alpha, red, green and blue (8 bits each, rounded), the way pixels are stored.
- TOMATO - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Tomato.
- toScreenPosition(Vector2) - Method in class org.openpatch.scratch.Camera
-
Where a world position shows on the stage.
- toScreenX(double) - Method in class org.openpatch.scratch.Camera
- toScreenY(double) - Method in class org.openpatch.scratch.Camera
- toString() - Method in record class org.openpatch.scratch.Bounds
-
Returns a string representation of this record class.
- toString() - Method in class org.openpatch.scratch.Color
- toString() - Method in record class org.openpatch.scratch.extension.ExtensionContext.DecodedImage
-
Returns a string representation of this record class.
- toString() - Method in class org.openpatch.scratch.extension.ExtensionContext.InputKey
- toString() - Method in record class org.openpatch.scratch.extension.ExtensionContext.KeyEvent
-
Returns a string representation of this record class.
- toString() - Method in record class org.openpatch.scratch.extension.ExtensionContext.LearnerError
-
Returns a string representation of this record class.
- toString() - Method in record class org.openpatch.scratch.extension.ExtensionContext.MouseEvent
-
Returns a string representation of this record class.
- toString() - Method in class org.openpatch.scratch.Sprite
-
The sprite's centre of the costume on the stage, as Scratch's "x position"/"y position".
- toString() - Method in class org.openpatch.scratch.tiled.TiledMap
- toString() - Method in class org.openpatch.scratch.Transition
- toString() - Method in class org.openpatch.scratch.Vector2
-
Returns the vector as a text, for example
Vector2[60.0, 80.0]. - toWorldPosition(Vector2) - Method in class org.openpatch.scratch.Camera
-
Which world position shows at a place on the stage.
- toWorldX(double) - Method in class org.openpatch.scratch.Camera
- toWorldY(double) - Method in class org.openpatch.scratch.Camera
- Transition - Class in org.openpatch.scratch
-
How one stage gives way to the next in
window.transitionToStage(…). - transitionToStage(Supplier, double) - Method in class org.openpatch.scratch.Window
-
Fades to a stage made now, on the game thread: a slow constructor shows the loading screen instead of freezing the window.
- transitionToStage(Supplier, Transition, double) - Method in class org.openpatch.scratch.Window
-
Shows a stage made now through a transition.
- transitionToStage(Stage, double) - Method in class org.openpatch.scratch.Window
-
Fades to a stage through black.
- translate(double, double) - Method in class org.openpatch.scratch.Shape
- Triangle - Class in org.openpatch.scratch
-
A triangle.
- Triangle(double, double, double, double, double, double) - Constructor for class org.openpatch.scratch.Triangle
- trigger(int, GamepadTrigger) - Method in class org.openpatch.scratch.gamepad.GamepadState
-
How far down the trigger is, 0 (not at all) to 1 (fully).
- turnLeft(double) - Method in class org.openpatch.scratch.Sprite
- turnRight(double) - Method in class org.openpatch.scratch.Sprite
- TURQUOISE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Turquoise.
- type - Variable in class org.openpatch.scratch.tiled.MapObject
-
The type of the map object.
- type - Variable in class org.openpatch.scratch.tiled.Property
-
The type of the property.
U
- U - Enum constant in enum class org.openpatch.scratch.KeyCode
- UI - Enum constant in enum class org.openpatch.scratch.Layer
-
In front of everything and unaffected by the camera: buttons, scores, menus.
- unitVector() - Method in class org.openpatch.scratch.Vector2
-
Returns the unit vector.
- UNKNOWN - Enum constant in enum class org.openpatch.scratch.KeyCode
- up() - Method in class org.openpatch.scratch.Pen
-
Lifts the pen: it no longer draws.
- UP - Enum constant in enum class org.openpatch.scratch.KeyCode
- use(Extension) - Static method in class org.openpatch.scratch.Window
-
Uses an extension that does not register itself through
META-INF/services(one in your own project). - useFont(String) - Static method in class org.openpatch.scratch.Text
-
The font every text uses unless it sets its own, from now on.
- useFont(String, double) - Static method in class org.openpatch.scratch.Text
-
A pixel font as default font, with the size at which one of its pixels is one stage pixel: for a pixel font whose outlines do not show its grid (most do: then
Text.useFont(String)is enough). - useFrameSmoothing(double) - Static method in class org.openpatch.scratch.Window
-
Frame smoothing: each frame is presented mixed with the one before it, this much in percent.
- useFullScreen() - Static method in class org.openpatch.scratch.Window
-
Opens the window full screen (a borderless window at the screen's size).
- usePixelArt() - Static method in class org.openpatch.scratch.Window
-
Pixel-art mode: images are not smoothed, the stage scales by whole numbers only, the default font is Jersey 10 and font sizes are rounded to its pixels.
- useSmoothPixelArt() - Static method in class org.openpatch.scratch.Window
-
Smooth pixel art (Godot's "canvas items" way of showing pixel art): as
Window.usePixelArt(), but the camera moves without snapping and zoom works at any factor. - useSource(GamepadSource) - Static method in class org.openpatch.scratch.gamepad.GamepadExtension
-
Replaces where the controllers' state comes from, for tests and parity scripts.
- useSplashLogo(String) - Static method in class org.openpatch.scratch.Window
-
The logo on the loading screen.
V
- V - Enum constant in enum class org.openpatch.scratch.KeyCode
- value - Variable in class org.openpatch.scratch.tiled.Property
-
The value of the property.
- valueOf(String) - Static method in enum class org.openpatch.scratch.extension.ExtensionContext.MouseEvent.Kind
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.openpatch.scratch.gamepad.GamepadButton
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.openpatch.scratch.gamepad.GamepadStick
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.openpatch.scratch.gamepad.GamepadTrigger
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.openpatch.scratch.KeyCode
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.openpatch.scratch.Layer
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.openpatch.scratch.MouseCode
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.openpatch.scratch.RotationStyle
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.openpatch.scratch.TextAlign
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.openpatch.scratch.TextStyle
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class org.openpatch.scratch.extension.ExtensionContext.MouseEvent.Kind
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.openpatch.scratch.gamepad.GamepadButton
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.openpatch.scratch.gamepad.GamepadStick
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.openpatch.scratch.gamepad.GamepadTrigger
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.openpatch.scratch.KeyCode
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.openpatch.scratch.Layer
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.openpatch.scratch.MouseCode
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.openpatch.scratch.RotationStyle
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.openpatch.scratch.TextAlign
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.openpatch.scratch.TextStyle
-
Returns an array containing the constants of this enum class, in the order they are declared.
- Vector2 - Class in org.openpatch.scratch
-
The
Vector2class represents a 2D vector with x and y coordinates. - Vector2() - Constructor for class org.openpatch.scratch.Vector2
-
Constructor for the null vector.
- Vector2(double, double) - Constructor for class org.openpatch.scratch.Vector2
-
Constructor for a 2D vector.
- Vector2(Vector2) - Constructor for class org.openpatch.scratch.Vector2
-
Copy constructor for copying a vector.
- version() - Method in class org.openpatch.scratch.drawing.DrawingExtension
- version() - Method in interface org.openpatch.scratch.extension.Extension
-
The extension's own version.
- version() - Method in class org.openpatch.scratch.gamepad.GamepadExtension
- version() - Method in class org.openpatch.scratch.recorder.RecorderExtension
- version() - Method in class org.openpatch.scratch.save.SaveExtension
- version() - Method in class org.openpatch.scratch.tiled.TiledExtension
- VIOLET - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Violet.
- visible - Variable in class org.openpatch.scratch.tiled.MapObject
-
The visibility status of the map object.
W
- W - Enum constant in enum class org.openpatch.scratch.KeyCode
- waitSeconds(double) - Method in class org.openpatch.scratch.Stage
-
Holds up the code that calls it for a number of seconds.
- waitUntil(BooleanSupplier) - Method in class org.openpatch.scratch.Stage
-
Holds up the code that calls it until a condition is true; see
Stage.waitSeconds(double). - WHEAT - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Wheat.
- wheel() - Method in record class org.openpatch.scratch.extension.ExtensionContext.MouseEvent
-
Returns the value of the
wheelrecord component. - WHEEL - Enum constant in enum class org.openpatch.scratch.extension.ExtensionContext.MouseEvent.Kind
- whenAddedToStage() - Method in class org.openpatch.scratch.Sprite
-
Called when the sprite was added to a stage.
- whenAddedToStage() - Method in class org.openpatch.scratch.Text
-
Called when the text was added to a stage.
- whenBackdropSwitches(String) - Method in class org.openpatch.scratch.Sprite
-
Called when the stage switches its backdrop.
- whenBackdropSwitches(String) - Method in class org.openpatch.scratch.Stage
-
Called when the backdrop switches.
- whenClicked() - Method in class org.openpatch.scratch.Sprite
-
Called when this sprite is clicked: a mouse button is pressed over its hitbox, and no sprite in front of it is under the pointer.
- whenExits() - Method in class org.openpatch.scratch.Window
-
Called when the program ends, on the game thread.
- whenGamepadButtonPressed(GamepadButton) - Method in interface org.openpatch.scratch.gamepad.GamepadListener
-
A button went down on one of the controllers.
- whenGamepadButtonReleased(GamepadButton) - Method in interface org.openpatch.scratch.gamepad.GamepadListener
-
A button came up on one of the controllers.
- whenGamepadConnected(int) - Method in interface org.openpatch.scratch.gamepad.GamepadListener
-
A controller appeared in a player's slot.
- whenIReceive(String) - Method in class org.openpatch.scratch.Sprite
-
Called when a message is broadcast.
- whenIReceive(String) - Method in class org.openpatch.scratch.Stage
-
Called when a message is broadcast.
- whenKeyPressed(KeyCode) - Method in class org.openpatch.scratch.Sprite
-
Called when a key is pressed, once per press (holding a key down does not repeat it).
- whenKeyPressed(KeyCode) - Method in class org.openpatch.scratch.Stage
-
Called when a key is pressed, once per press.
- whenKeyReleased(KeyCode) - Method in class org.openpatch.scratch.Sprite
-
Called when a key is released.
- whenKeyReleased(KeyCode) - Method in class org.openpatch.scratch.Stage
-
Called when a key is released.
- whenMouseClicked(MouseCode) - Method in class org.openpatch.scratch.Sprite
-
Called when a mouse button is pressed anywhere on the stage.
- whenMouseClicked(MouseCode) - Method in class org.openpatch.scratch.Stage
-
Called when a mouse button is pressed anywhere on the stage.
- whenMouseMoved(double, double) - Method in class org.openpatch.scratch.Sprite
-
Called when the mouse moves.
- whenMouseWheelMoved(double) - Method in class org.openpatch.scratch.Stage
-
Called when the mouse wheel turns.
- whenRemovedFromStage() - Method in class org.openpatch.scratch.Sprite
-
Called when the sprite was removed from its stage.
- whenRemovedFromStage() - Method in class org.openpatch.scratch.Text
-
Called when the text was removed from its stage.
- whenStartsAsClone() - Method in class org.openpatch.scratch.Sprite
-
Called in a new clone, right after it was made.
- WHITE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color White.
- WHITE_SMOKE - Static variable in class org.openpatch.scratch.HtmlColor
-
The color White Smoke.
- width - Variable in class org.openpatch.scratch.tiled.MapObject
-
The width of the map object.
- width - Variable in class org.openpatch.scratch.tiled.TilesetImage
- width() - Method in record class org.openpatch.scratch.Bounds
-
Returns the value of the
widthrecord component. - width() - Method in record class org.openpatch.scratch.extension.ExtensionContext.DecodedImage
-
Returns the value of the
widthrecord component. - Window - Class in org.openpatch.scratch
-
The window of a program: there is one, created first, and it shows one stage at a time.
- Window() - Constructor for class org.openpatch.scratch.Window
-
A window of 480 × 360, Scratch's stage size.
- Window(int, int) - Constructor for class org.openpatch.scratch.Window
-
A window whose stage has this size in stage pixels.
- Window(int, int, String) - Constructor for class org.openpatch.scratch.Window
-
A window of a size that loads a folder of assets first.
- Window(String) - Constructor for class org.openpatch.scratch.Window
-
A window of 480 × 360 that loads every image, sound and font in a folder before the first frame, showing a loading screen.
- WINDOWS - Enum constant in enum class org.openpatch.scratch.KeyCode
- withAlpha(double) - Method in class org.openpatch.scratch.Color
- withBlue(double) - Method in class org.openpatch.scratch.Color
- withBrightness(double) - Method in class org.openpatch.scratch.Color
- withGreen(double) - Method in class org.openpatch.scratch.Color
- withHue(double) - Method in class org.openpatch.scratch.Color
-
Another colour (hue), keeping saturation, brightness and alpha.
- withRed(double) - Method in class org.openpatch.scratch.Color
- withSaturation(double) - Method in class org.openpatch.scratch.Color
X
- x - Variable in class org.openpatch.scratch.tiled.MapObject
-
The x-coordinate of the map object.
- x() - Method in record class org.openpatch.scratch.Bounds
-
Returns the value of the
xrecord component. - x() - Method in record class org.openpatch.scratch.extension.ExtensionContext.MouseEvent
-
Returns the value of the
xrecord component. - X - Enum constant in enum class org.openpatch.scratch.gamepad.GamepadButton
-
The left face button (Square).
- X - Enum constant in enum class org.openpatch.scratch.KeyCode
Y
- y - Variable in class org.openpatch.scratch.tiled.MapObject
-
The y-coordinate of the map object.
- y() - Method in record class org.openpatch.scratch.Bounds
-
Returns the value of the
yrecord component. - y() - Method in record class org.openpatch.scratch.extension.ExtensionContext.MouseEvent
-
Returns the value of the
yrecord component. - Y - Enum constant in enum class org.openpatch.scratch.gamepad.GamepadButton
-
The top face button (Triangle).
- Y - Enum constant in enum class org.openpatch.scratch.KeyCode
- YELLOW - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Yellow.
- YELLOW_GREEN - Static variable in class org.openpatch.scratch.HtmlColor
-
The color Yellow Green.
Z
A B C D E F G H I J K L M N O P Q R S T U V W X Y ZAll Classes and Interfaces|All Packages|Constant Field Values|Serialized Form