java.lang.Object
net.ixdarklord.folios.internal.client.page.Shapes

public final class Shapes extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    The little controls printed on pages: each a pixel icon on a clasp ('X' in its ink, 'o' a softer shade).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    How big a clasp is, square.
    static final int
    How many leaves of a book's block show past its pages, a pixel each.
    static final int
    The spine's width between a screen book's pages, which a spread's halves draw on into to meet.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    acrossFold(GuidePainter painter, net.minecraft.util.FormattedCharSequence line, int y, int color, boolean right)
    A line of text centred on a spread's fold, as each page of it prints it: only the letters whose middle is on its side, placed so the halves meet as one line while the book lies open (on a screen book, across the spine between the pages).
    static void
    arrow(GuidePainter painter, int x, int y, int color)
    A small arrow pointing right, 9 by 7 pixels from (x, y).
    static void
    button(GuidePainter painter, int x, int y, Shapes.Icon icon, boolean hovered)
    A control: an eight-sided clasp of the page's own paper with a hairline rim and its icon in the middle.
    static void
    deckle(GuidePainter painter, int x0, int x1, int y, boolean down, int behind)
    A page's rough-cut edge along its head (down false: the edge is row y, the page below it) or its foot (down true: the page above): small irregular bites out of the paper, showing behind, and a faint worn line where the edge is whole.
    static void
    deckle(GuidePainter painter, int x0, int x1, int y, boolean down, int behind, float wear)
    As deckle(GuidePainter, int, int, int, boolean, int), cut rougher for a wear over 1.
    static void
    foreEdge(GuidePainter painter, int x, int y0, int y1, boolean right)
    The fore-edge of a book's leaves: the block of pages showing past the page, a pixel a leaf, from x (the page's edge) outwards, rightwards or leftwards; from y0 to y1.
    static void
    foreEdge(GuidePainter painter, int x, int y0, int y1, boolean right, int leaves)
    The same, leaves wide.
    static void
    numberButton(GuidePainter painter, int x, int y, int width, String number, boolean hovered, boolean picked)
    A clasp width wide with a number on it in place of an icon, for picking one of several things a page shows.
    static void
    pageFrame(GuidePainter painter, net.minecraft.resources.ResourceLocation texture, int width, int height)
    The page's frame, drawn under what is on it: the book's frame texture over the whole page, tinted between the page's lines and the book's colour, so it sits as quietly on dark paper as on parchment.
    static void
    pageFrame(GuidePainter painter, net.minecraft.resources.ResourceLocation texture, int width, int height, @Nullable GuidePage.Laid page, boolean right)
    The page's frame, or for half of a spread the frame joined with the other half's: its side at the fold left out, its top and bottom running on (a plain middle column of the texture, stretched) to meet the other page's.
    static void
    panel(GuidePainter painter, int x0, int y0, int x1, int y1)
    A panel: its corner pixels left out, so it reads as slightly rounded.
    static int
    ribbonRoot(int edge, int depth)
    Where a ribbon tucked depth leaves deep comes out of the fore-edge at the page's edge.
    static void
    slot(GuidePainter painter, int x, int y)
    An 18-pixel slot for an item drawn at (x + 1, y + 1).
    static int
    tabDepth(int order, float out)
    How deep among the leaves a tab is tucked, in leaves: the top one just under the surface, each below a little deeper; the open one (and, part way, one under the pointer) rises to the surface.
    static int
    tabDepth(int order, float out, int leaves)
    The same, in a fore-edge leaves wide.
    static void
    tuck(GuidePainter painter, int edge, int y, int height, int depth, int ribbon)
    Over a ribbon's root, the leaves above it: they lie on it from the page's edge to where it comes out of the block, so it is seen between the leaves at its depth; and a soft shadow they cast on it as it leaves them.
    static void
    wornEdges(GuidePainter painter, int x0, int y0, int x1, int y1, boolean outerRight, int behind)
    A page worn with age, from x0 to x1 and y0 to y1: yellowing creeping in from its head, its foot and its outer side (not its fold) unevenly, deeper here and shallower there; a few faint stains; and the odd small nick or tear in its outer edge.
    static void
    wornEdges(GuidePainter painter, int x0, int y0, int x1, int y1, boolean outerRight, int behind, float wear)
    As wornEdges(GuidePainter, int, int, int, int, boolean, int), as worn as wear says: 1 lightly, more for a well-thumbed book, its yellowing deeper and stronger, its nicks more and bigger, more stains, and its outer corners rubbed dark.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SCREEN_SPINE

      public static final int SCREEN_SPINE
      The spine's width between a screen book's pages, which a spread's halves draw on into to meet.
      See Also:
    • FORE_EDGE

      public static final int FORE_EDGE
      How many leaves of a book's block show past its pages, a pixel each.
      See Also:
    • BUTTON

      public static final int BUTTON
      How big a clasp is, square.
      See Also:
  • Method Details

    • panel

      public static void panel(GuidePainter painter, int x0, int y0, int x1, int y1)
      A panel: its corner pixels left out, so it reads as slightly rounded.
    • slot

      public static void slot(GuidePainter painter, int x, int y)
      An 18-pixel slot for an item drawn at (x + 1, y + 1).
    • pageFrame

      public static void pageFrame(GuidePainter painter, net.minecraft.resources.ResourceLocation texture, int width, int height)
      The page's frame, drawn under what is on it: the book's frame texture over the whole page, tinted between the page's lines and the book's colour, so it sits as quietly on dark paper as on parchment.
    • pageFrame

      public static void pageFrame(GuidePainter painter, net.minecraft.resources.ResourceLocation texture, int width, int height, @Nullable GuidePage.Laid page, boolean right)
      The page's frame, or for half of a spread the frame joined with the other half's: its side at the fold left out, its top and bottom running on (a plain middle column of the texture, stretched) to meet the other page's.
    • acrossFold

      public static void acrossFold(GuidePainter painter, net.minecraft.util.FormattedCharSequence line, int y, int color, boolean right)
      A line of text centred on a spread's fold, as each page of it prints it: only the letters whose middle is on its side, placed so the halves meet as one line while the book lies open (on a screen book, across the spine between the pages). Nothing is drawn past the page, so a leaf turning carries its own letters and leaves none behind.
    • foreEdge

      public static void foreEdge(GuidePainter painter, int x, int y0, int y1, boolean right)
      The fore-edge of a book's leaves: the block of pages showing past the page, a pixel a leaf, from x (the page's edge) outwards, rightwards or leftwards; from y0 to y1.
    • foreEdge

      public static void foreEdge(GuidePainter painter, int x, int y0, int y1, boolean right, int leaves)
      The same, leaves wide.
    • deckle

      public static void deckle(GuidePainter painter, int x0, int x1, int y, boolean down, int behind)
      A page's rough-cut edge along its head (down false: the edge is row y, the page below it) or its foot (down true: the page above): small irregular bites out of the paper, showing behind, and a faint worn line where the edge is whole.
    • deckle

      public static void deckle(GuidePainter painter, int x0, int x1, int y, boolean down, int behind, float wear)
      As deckle(GuidePainter, int, int, int, boolean, int), cut rougher for a wear over 1.
    • wornEdges

      public static void wornEdges(GuidePainter painter, int x0, int y0, int x1, int y1, boolean outerRight, int behind)
      A page worn with age, from x0 to x1 and y0 to y1: yellowing creeping in from its head, its foot and its outer side (not its fold) unevenly, deeper here and shallower there; a few faint stains; and the odd small nick or tear in its outer edge. outerRight for a right-hand page, whose outer side is at x1. Drawn over the paper, under what is on the page; the same every frame.
    • wornEdges

      public static void wornEdges(GuidePainter painter, int x0, int y0, int x1, int y1, boolean outerRight, int behind, float wear)
      As wornEdges(GuidePainter, int, int, int, int, boolean, int), as worn as wear says: 1 lightly, more for a well-thumbed book, its yellowing deeper and stronger, its nicks more and bigger, more stains, and its outer corners rubbed dark.
    • tabDepth

      public static int tabDepth(int order, float out)
      How deep among the leaves a tab is tucked, in leaves: the top one just under the surface, each below a little deeper; the open one (and, part way, one under the pointer) rises to the surface. order is its place from the top, out how far it is out (TabMotion.out).
    • tabDepth

      public static int tabDepth(int order, float out, int leaves)
      The same, in a fore-edge leaves wide.
    • ribbonRoot

      public static int ribbonRoot(int edge, int depth)
      Where a ribbon tucked depth leaves deep comes out of the fore-edge at the page's edge.
    • tuck

      public static void tuck(GuidePainter painter, int edge, int y, int height, int depth, int ribbon)
      Over a ribbon's root, the leaves above it: they lie on it from the page's edge to where it comes out of the block, so it is seen between the leaves at its depth; and a soft shadow they cast on it as it leaves them. ribbon is the tab's colour, for its shadow.
    • button

      public static void button(GuidePainter painter, int x, int y, Shapes.Icon icon, boolean hovered)
      A control: an eight-sided clasp of the page's own paper with a hairline rim and its icon in the middle. Under the pointer it lifts off the page, casting a little shadow, and its icon takes the book's colour.
    • numberButton

      public static void numberButton(GuidePainter painter, int x, int y, int width, String number, boolean hovered, boolean picked)
      A clasp width wide with a number on it in place of an icon, for picking one of several things a page shows. The one picked is pressed into the page, its face of the book's colour; another lifts under the pointer.
    • arrow

      public static void arrow(GuidePainter painter, int x, int y, int color)
      A small arrow pointing right, 9 by 7 pixels from (x, y).