Class MSDFGen

java.lang.Object
org.lwjgl.util.msdfgen.MSDFGen

public class MSDFGen extends Object
  • Field Details

  • Method Details

    • nmsdf_bitmap_alloc

      public static int nmsdf_bitmap_alloc(int type, int width, int height, long bitmap)
      Unsafe version of: bitmap_alloc
    • msdf_bitmap_alloc

      public static int msdf_bitmap_alloc(int type, int width, int height, MSDFGenBitmap bitmap)
      Allocates a new MSDF bitmap object to render a shape into using the internal allocator.
      Parameters:
      type - the type of bitmap to allocate. One of:
      BITMAP_TYPE_SDFBITMAP_TYPE_PSDFBITMAP_TYPE_MSDFBITMAP_TYPE_MTSDF
      width - the width of the bitmap in pixels
      height - the height of the bitmap in pixels
      bitmap - a pointer to an msdf_bitmap_t structure to allocate a new bitmap into
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_bitmap_get_channel_count

      public static int nmsdf_bitmap_get_channel_count(long bitmap, long channel_count)
      Unsafe version of: bitmap_get_channel_count
    • msdf_bitmap_get_channel_count

      public static int msdf_bitmap_get_channel_count(MSDFGenBitmap bitmap, IntBuffer channel_count)
      Retrieves the number of color channels used by the given bitmap.
      Parameters:
      bitmap - a pointer to an msdf_bitmap_t structure to retrieve the channel count from
      channel_count - a pointer to a variable which is populated with the number of color channels used by the given bitmap
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_bitmap_get_pixels

      public static int nmsdf_bitmap_get_pixels(long bitmap, long pixels)
      Unsafe version of: bitmap_get_pixels
    • msdf_bitmap_get_pixels

      public static int msdf_bitmap_get_pixels(MSDFGenBitmap bitmap, org.lwjgl.PointerBuffer pixels)
      Retrieves the address of the raw pixel data of the given bitmap.
      Parameters:
      bitmap - a pointer to an msdf_bitmap_t structure to retrieve the raw pixel data from
      pixels - a pointer to an address which is populated with the raw pixel data of the given bitmap
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_bitmap_get_byte_size

      public static int nmsdf_bitmap_get_byte_size(long bitmap, long size)
      Unsafe version of: bitmap_get_byte_size
    • msdf_bitmap_get_byte_size

      public static int msdf_bitmap_get_byte_size(MSDFGenBitmap bitmap, org.lwjgl.PointerBuffer size)
      Retrieves the size of the pixel data of the given bitmap in bytes.
      Parameters:
      bitmap - a pointer to an msdf_bitmap_t structure to retrieve the size of the raw pixel data from
      size - a pointer to a variable which is populated with the byte size of the raw pixel data of the given bitmap
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_bitmap_free

      public static void nmsdf_bitmap_free(long bitmap)
      Unsafe version of: bitmap_free
    • msdf_bitmap_free

      public static void msdf_bitmap_free(MSDFGenBitmap bitmap)
      Calls the destructor of the given bitmap and frees its memory using the internal allocator.
      Parameters:
      bitmap - a pointer to an msdf_bitmap_t structure to be freed.
    • nmsdf_shape_alloc

      public static int nmsdf_shape_alloc(long shape)
      Unsafe version of: shape_alloc
    • msdf_shape_alloc

      public static int msdf_shape_alloc(org.lwjgl.PointerBuffer shape)
      Allocates a new MSDF shape object using the internal allocator.
      Parameters:
      shape - a pointer to an address which is populated with the address of the newly allocated shape.
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_shape_get_bounds

      public static int nmsdf_shape_get_bounds(long shape, long bounds)
      Unsafe version of: shape_get_bounds
    • msdf_shape_get_bounds

      public static int msdf_shape_get_bounds(long shape, MSDFGenBounds bounds)
      Retrieves the bounds of the given shape.
      Parameters:
      shape - a pointer to a shape object to retrieve the bounds from
      bounds - a pointer to a variable which is populated with the bounds of the given shape
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_shape_add_contour

      public static int nmsdf_shape_add_contour(long shape, long contour)
      Unsafe version of: shape_add_contour
    • msdf_shape_add_contour

      public static int msdf_shape_add_contour(long shape, org.lwjgl.PointerBuffer contour)
      Adds a new contour to the given shape.
      Parameters:
      shape - a pointer to a shape object to add a new contour to
      contour - a pointer to a contour handle to be populated with a new contour that was added to the shape
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_shape_remove_contour

      public static int nmsdf_shape_remove_contour(long shape, long contour)
      Unsafe version of: shape_remove_contour
    • msdf_shape_remove_contour

      public static int msdf_shape_remove_contour(long shape, long contour)
      Removes the given contour from the given shape if present.
      Parameters:
      shape - a pointer to a shape object to remove the given contour from
      contour - a pointer to the contour to remove from the shape
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_shape_get_contour_count

      public static int nmsdf_shape_get_contour_count(long shape, long size)
      Unsafe version of: shape_get_contour_count
    • msdf_shape_get_contour_count

      public static int msdf_shape_get_contour_count(long shape, org.lwjgl.PointerBuffer size)
      Retrieves the number of contours allocated within the given shape object.
      Parameters:
      shape - a pointer to a shape object from which to retrieve the contour count
      size - a pointer to a variable which is populated with the number of contours of the given shape
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_shape_get_contour

      public static int nmsdf_shape_get_contour(long shape, long index, long contour)
      Unsafe version of: shape_get_contour
    • msdf_shape_get_contour

      public static int msdf_shape_get_contour(long shape, long index, org.lwjgl.PointerBuffer contour)
      Retrieves a contour at a given index from the given shape.
      Parameters:
      shape - a pointer to a shape object from which to retrieve a contour
      index - the index of the contour to retrieve
      contour - a pointer to an address which is populated with the address of the contour at the given index if present
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_shape_get_edge_count

      public static int nmsdf_shape_get_edge_count(long shape, long count)
      Unsafe version of: shape_get_edge_count
    • msdf_shape_get_edge_count

      public static int msdf_shape_get_edge_count(long shape, org.lwjgl.PointerBuffer count)
      Retrieves the number of edges of the given shape.
      Parameters:
      shape - a pointer to a shape from which to retrieve the edge count
      count - a pointer to a variable which is populated with the number of edges defined by the given shape
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_shape_has_inverse_y_axis

      public static int nmsdf_shape_has_inverse_y_axis(long shape, long inverse_y_axis)
      Unsafe version of: shape_has_inverse_y_axis
    • msdf_shape_has_inverse_y_axis

      public static int msdf_shape_has_inverse_y_axis(long shape, IntBuffer inverse_y_axis)
      Retrieves the inverse-y-axis flag of the given shape.
      Parameters:
      shape - a pointer to a shape from which to fetch the inverse-y-axis flag
      inverse_y_axis - a pointer to a variable which is populated with TRUE when the y-axis of the given shape is inverted. Otherwise the variable will be set to FALSE.
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_shape_normalize

      public static int nmsdf_shape_normalize(long shape)
      Unsafe version of: shape_normalize
    • msdf_shape_normalize

      public static int msdf_shape_normalize(long shape)
      Normalizes the given shape.
      Parameters:
      shape - a pointer to a shape to normalize
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_shape_validate

      public static int nmsdf_shape_validate(long shape, long result)
      Unsafe version of: shape_validate
    • msdf_shape_validate

      public static int msdf_shape_validate(long shape, IntBuffer result)
      Validates the given shape.
      Parameters:
      shape - a pointer to a shape to validate
      result - a pointer to a variable which is populated with TRUE when the validation was successful. Otherwise the variable will be set to FALSE.
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_shape_bound

      public static int nmsdf_shape_bound(long shape, long bounds)
      Unsafe version of: shape_bound
    • msdf_shape_bound

      public static int msdf_shape_bound(long shape, MSDFGenBounds bounds)
      Adjusts the given bounding box to fit the given shape.
      Parameters:
      shape - a pointer to a shape to fit into the given bounding box
      bounds - a pointer to a bounding box which should at least fit the given shape
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_shape_bound_miters

      public static int nmsdf_shape_bound_miters(long shape, long bounds, double border, double miter_limit, int polarity)
      Unsafe version of: shape_bound_miters
    • msdf_shape_bound_miters

      public static int msdf_shape_bound_miters(long shape, MSDFGenBounds bounds, double border, double miter_limit, int polarity)
      Adjusts the given bounding box to fit the given shape including a mitered border.
      Parameters:
      shape - a pointer to a shape to fit into the given bounding box
      bounds - a pointer to a bounding box which should at least fit the given shape including the specified border
      border - the size of the border
      miter_limit - the miter limit value
      polarity - the miter polarity
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_shape_orient_contours

      public static int nmsdf_shape_orient_contours(long shape)
      Unsafe version of: shape_orient_contours
    • msdf_shape_orient_contours

      public static int msdf_shape_orient_contours(long shape)
      Orients all contours associated with the given shape before rendering.
      Parameters:
      shape - a pointer to a shape whose contours to orient
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_shape_edge_colors_simple

      public static int nmsdf_shape_edge_colors_simple(long shape, double angle_threshold)
      Unsafe version of: shape_edge_colors_simple
    • msdf_shape_edge_colors_simple

      public static int msdf_shape_edge_colors_simple(long shape, double angle_threshold)
      Colors the edges of the given shape using the default MSDF colors specified by the MSDF_COLOR_ prefixed constants.
      Parameters:
      shape - a pointer to a shape whose edges to color with the default MSDF colors
      angle_threshold - the threshold angle in degrees
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_shape_edge_colors_ink_trap

      public static int nmsdf_shape_edge_colors_ink_trap(long shape, double angle_threshold)
      Unsafe version of: shape_edge_colors_ink_trap
    • msdf_shape_edge_colors_ink_trap

      public static int msdf_shape_edge_colors_ink_trap(long shape, double angle_threshold)
      Colors the edges of the given shape using the default MSDF colors specified by the MSDF_COLOR_ prefixed constants using the ink trap algorithm.
      Parameters:
      shape - a pointer to a shape whose edges to color with the default MSDF colors
      angle_threshold - the threshold angle in degrees
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_shape_edge_colors_by_distance

      public static int nmsdf_shape_edge_colors_by_distance(long shape, double angle_threshold)
    • msdf_shape_edge_colors_by_distance

      public static int msdf_shape_edge_colors_by_distance(long shape, double angle_threshold)
      Colors the edges of the given shape using the default MSDF colors specified by the MSDF_COLOR_ prefixed constants using the distance.
      Parameters:
      shape - a pointer to a shape whose edges to color with the default MSDF colors
      angle_threshold - the threshold angle in degrees
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_shape_one_shot_distance

      public static int nmsdf_shape_one_shot_distance(long shape, long origin, long distance)
      Unsafe version of: shape_one_shot_distance
    • msdf_shape_one_shot_distance

      public static int msdf_shape_one_shot_distance(long shape, MSDFGenVector2 origin, DoubleBuffer distance)
      Finds the distance between shape and origin.
      Parameters:
      shape - a pointer to the shape to find the distance to
      origin - the point to find the distance relative to the given shape to
      distance - a pointer to a variable to be populated with the calculated distance to the given shape
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_shape_free

      public static void nmsdf_shape_free(long shape)
      Unsafe version of: shape_free
    • msdf_shape_free

      public static void msdf_shape_free(long shape)
      Calls the destructor of the given bitmap and frees its memory using the internal allocator.
      Parameters:
      shape - a pointer to a shape object to be freed
    • nmsdf_contour_alloc

      public static int nmsdf_contour_alloc(long contour)
      Unsafe version of: contour_alloc
    • msdf_contour_alloc

      public static int msdf_contour_alloc(org.lwjgl.PointerBuffer contour)
      Allocates a new contour object using the internal allocator.
      Parameters:
      contour - a pointer to an address which is populated with the address of the newly allocated contour object
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_contour_add_edge

      public static int nmsdf_contour_add_edge(long contour, long segment)
      Unsafe version of: contour_add_edge
    • msdf_contour_add_edge

      public static int msdf_contour_add_edge(long contour, long segment)
      Adds a new edge to the given contour and returns its associated segment handle.
      Parameters:
      contour - a pointer to the contour to add a new edge (segment) to
      segment - a pointer to the segment to add as an edge
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_contour_remove_edge

      public static int nmsdf_contour_remove_edge(long contour, long segment)
      Unsafe version of: contour_remove_edge
    • msdf_contour_remove_edge

      public static int msdf_contour_remove_edge(long contour, long segment)
      Removes the given edge from the given contour if present.
      Parameters:
      contour - a pointer to the contour to remove the given edge (segment) from
      segment - a pointer to the segment to remove from the given contour
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_contour_get_edge_count

      public static int nmsdf_contour_get_edge_count(long contour, long count)
      Unsafe version of: contour_get_edge_count
    • msdf_contour_get_edge_count

      public static int msdf_contour_get_edge_count(long contour, org.lwjgl.PointerBuffer count)
      Retrieves the edge count of the given contour.
      Parameters:
      contour - a pointer to the contour to retrieve the edge count from
      count - a pointer to a variable which is populated with the edge count of the given contour
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_contour_get_edge

      public static int nmsdf_contour_get_edge(long contour, long index, long segment)
      Unsafe version of: contour_get_edge
    • msdf_contour_get_edge

      public static int msdf_contour_get_edge(long contour, long index, org.lwjgl.PointerBuffer segment)
      Retrieves an edge (segment) from the given contour at the given index.
      Parameters:
      contour - a pointer to the contour from which to retrieve the given edge segment
      index - the index from which to retrieve the edge segment
      segment - a pointer to an address which is populated with the address of the edge segment at the given index if present
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_contour_bound

      public static int nmsdf_contour_bound(long contour, long bounds)
      Unsafe version of: contour_bound
    • msdf_contour_bound

      public static int msdf_contour_bound(long contour, MSDFGenBounds bounds)
      Adjusts the given bounding box to fit at least the given contour.
      Parameters:
      contour - a pointer to the contour which should at least fit into the given bounding box
      bounds - a pointer to the bounding box to fit the given contour into
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_contour_bound_miters

      public static int nmsdf_contour_bound_miters(long contour, long bounds, double border, double miter_limit, int polarity)
      Unsafe version of: contour_bound_miters
    • msdf_contour_bound_miters

      public static int msdf_contour_bound_miters(long contour, MSDFGenBounds bounds, double border, double miter_limit, int polarity)
      Adjust the given bounding box to fit at least the given contour including a specified border.
      Parameters:
      contour - a pointer to the contour which should at least fit into the given bounding box
      bounds - a pointer to the bounding box to fit the given contour including the specified border
      border - the size of the border
      miter_limit - the miter limit value
      polarity - the miter polarity
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_contour_get_winding

      public static int nmsdf_contour_get_winding(long contour, long winding)
      Unsafe version of: contour_get_winding
    • msdf_contour_get_winding

      public static int msdf_contour_get_winding(long contour, IntBuffer winding)
      Retrieves the winding direction of the given contour.
      Parameters:
      contour - a pointer to the contour of which to retrieve the winding direction
      winding - a pointer to a variables which is populated with the winding direction of the given contour
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_contour_reverse

      public static int nmsdf_contour_reverse(long contour)
      Unsafe version of: contour_reverse
    • msdf_contour_reverse

      public static int msdf_contour_reverse(long contour)
      Reverses the order of edges in the given contour.
      Parameters:
      contour - a pointer to the contour which to reverse the edge order for
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_contour_free

      public static void nmsdf_contour_free(long contour)
      Unsafe version of: contour_free
    • msdf_contour_free

      public static void msdf_contour_free(long contour)
      Calls the destructor of the given bitmap and frees its memory using the internal allocator.
      Parameters:
      contour - a pointer to the contour to free
    • nmsdf_segment_alloc

      public static int nmsdf_segment_alloc(int type, long segment)
      Unsafe version of: segment_alloc
    • msdf_segment_alloc

      public static int msdf_segment_alloc(int type, org.lwjgl.PointerBuffer segment)
      Allocates a new segment of the given type and populates the given address with the address of the newly allocated segment.
      Parameters:
      type - the type of segment to allocate. One of:
      SEGMENT_TYPE_LINEARSEGMENT_TYPE_QUADRATICSEGMENT_TYPE_CUBIC
      segment - a pointer to an address which is populated with the address of the newly allocated segment
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_segment_get_type

      public static int nmsdf_segment_get_type(long segment, long type)
      Unsafe version of: segment_get_type
    • msdf_segment_get_type

      public static int msdf_segment_get_type(long segment, IntBuffer type)
      Retrieves the type of the given segment.
      Parameters:
      segment - a pointer to the segment of which to retrieve the type
      type - a pointer to a variable which is populated with the type of the given segment
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_segment_get_point_count

      public static int nmsdf_segment_get_point_count(long segment, long count)
      Unsafe version of: segment_get_point_count
    • msdf_segment_get_point_count

      public static int msdf_segment_get_point_count(long segment, org.lwjgl.PointerBuffer count)
      Retrieves the point count of the given segment.
      Parameters:
      segment - a pointer to the segment of which to retrieve the number of points
      count - a pointer to a variable which is populated with the number of points of the given segment
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_segment_get_point

      public static int nmsdf_segment_get_point(long segment, long index, long point)
      Unsafe version of: segment_get_point
    • msdf_segment_get_point

      public static int msdf_segment_get_point(long segment, long index, MSDFGenVector2 point)
      Retrieves a point at the given index from the given segment.
      Parameters:
      segment - a pointer to the segment from which to retrieve a point
      index - the index of the point to retrieve
      point - a pointer to a point which is populated with the coordinates of the point at the given index if present
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_segment_set_point

      public static int nmsdf_segment_set_point(long segment, long index, long point)
      Unsafe version of: segment_set_point
    • msdf_segment_set_point

      public static int msdf_segment_set_point(long segment, long index, MSDFGenVector2 point)
      Sets the coordinates of a point at the given index in the given segment.
      Parameters:
      segment - a pointer to the segment of which to set the point
      index - the index of the point to set
      point - a pointer to a point which is copied to the given index within the segment
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_segment_get_color

      public static int nmsdf_segment_get_color(long segment, long color)
      Unsafe version of: segment_get_color
    • msdf_segment_get_color

      public static int msdf_segment_get_color(long segment, IntBuffer color)
      Retrieves the color of the given segment.
      Parameters:
      segment - a pointer to the segment of which to retrieve the color
      color - a pointer to a variable which is populated with the color of the given segment. Will be one of the constants prefixed with MSDF_COLOR_.
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_segment_set_color

      public static int nmsdf_segment_set_color(long segment, int color)
      Unsafe version of: segment_set_color
    • msdf_segment_set_color

      public static int msdf_segment_set_color(long segment, int color)
      Sets the color of the given segment.
      Parameters:
      segment - a pointer to the segment of which to set the color
      color - the color to set. One of:
      EDGE_COLOR_BLACKEDGE_COLOR_REDEDGE_COLOR_GREENEDGE_COLOR_YELLOWEDGE_COLOR_BLUE
      EDGE_COLOR_MAGENTAEDGE_COLOR_CYANEDGE_COLOR_WHITE
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_segment_get_direction

      public static int nmsdf_segment_get_direction(long segment, double param, long direction)
      Unsafe version of: segment_get_direction
    • msdf_segment_get_direction

      public static int msdf_segment_get_direction(long segment, double param, MSDFGenVector2 direction)
      Retrieves the direction of the given segment at the given point.
      Parameters:
      segment - a pointer to the segment of which to retrieve the direction
      param - the point at which to retrieve the segment direction
      direction - a pointer to a variable which is populated with the direction of the given segment at the given point
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_segment_get_direction_change

      public static int nmsdf_segment_get_direction_change(long segment, double param, long direction_change)
      Unsafe version of: segment_get_direction_change
    • msdf_segment_get_direction_change

      public static int msdf_segment_get_direction_change(long segment, double param, MSDFGenVector2 direction_change)
      Retrieves the direction change of the given segment at the given point.
      Parameters:
      segment - a pointer to the segment of which to retrieve the direction change
      param - the point at which to retrieve the segment direction change
      direction_change - a pointer to a variable which is populated with the direction change of the given segment at the given point
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_segment_point

      public static int nmsdf_segment_point(long segment, double param, long point)
      Unsafe version of: segment_point
    • msdf_segment_point

      public static int msdf_segment_point(long segment, double param, MSDFGenVector2 point)
      Retrieves the point on the given edge segment specified by the given parameter.
      Parameters:
      segment - a pointer to the segment of which to retrieve the edge point
      param - the point at which to sample
      point - a pointer to a variable which is populated with the edge point at the given location from the given segment
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_segment_bound

      public static int nmsdf_segment_bound(long segment, long bounds)
      Unsafe version of: segment_bound
    • msdf_segment_bound

      public static int msdf_segment_bound(long segment, MSDFGenBounds bounds)
      Adjusts the given bounding box to fit at least the given segment.
      Parameters:
      segment - a pointer to the segment which should at least fit in the given bounding box
      bounds - a pointer to the bounding box which should at least fit the given segment
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_segment_move_start_point

      public static int nmsdf_segment_move_start_point(long segment, long point)
      Unsafe version of: segment_move_start_point
    • msdf_segment_move_start_point

      public static int msdf_segment_move_start_point(long segment, MSDFGenVector2 point)
      Moves the start point of the given segment.
      Parameters:
      segment - a pointer to the segment of which to adjust the start point
      point - a pointer to the new start point of the given segment
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_segment_move_end_point

      public static int nmsdf_segment_move_end_point(long segment, long point)
      Unsafe version of: segment_move_end_point
    • msdf_segment_move_end_point

      public static int msdf_segment_move_end_point(long segment, MSDFGenVector2 point)
      Moves the end point of the given segment.
      Parameters:
      segment - a pointer to the segment of which to adjust the end point
      point - a pointer to the new end point of the given segment
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_segment_free

      public static void nmsdf_segment_free(long segment)
      Unsafe version of: segment_free
    • msdf_segment_free

      public static void msdf_segment_free(long segment)
      Calls the destructor of the given segment and frees its memory using the internal allocator.
      Parameters:
      segment - a pointer to the segment to free
    • nmsdf_generate_sdf

      public static int nmsdf_generate_sdf(long output, long shape, long transform)
      Unsafe version of: generate_sdf
    • msdf_generate_sdf

      public static int msdf_generate_sdf(MSDFGenBitmap output, long shape, MSDFGenTransform transform)
      Parameters:
      output - a pointer to a bitmap that was allocated with bitmap_alloc to which the given shape is rendered. The bitmap must be of type BITMAP_TYPE_SDF.
      shape - a pointer to the shape to render to the given bitmap
      transform - the transform which is applied to the given shape during rendering
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_generate_psdf

      public static int nmsdf_generate_psdf(long output, long shape, long transform)
      Unsafe version of: generate_psdf
    • msdf_generate_psdf

      public static int msdf_generate_psdf(MSDFGenBitmap output, long shape, MSDFGenTransform transform)
      Parameters:
      output - a pointer to a bitmap that was allocated with bitmap_alloc to which the given shape is rendered. The bitmap must be of type BITMAP_TYPE_PSDF.
      shape - a pointer to the shape to render to the given bitmap
      transform - the transform which is applied to the given shape during rendering
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_generate_msdf

      public static int nmsdf_generate_msdf(long output, long shape, long transform)
      Unsafe version of: generate_msdf
    • msdf_generate_msdf

      public static int msdf_generate_msdf(MSDFGenBitmap output, long shape, MSDFGenTransform transform)
      Parameters:
      output - a pointer to a bitmap that was allocated with bitmap_alloc to which the given shape is rendered. The bitmap must be of type BITMAP_TYPE_MSDF.
      shape - a pointer to the shape to render to the given bitmap
      transform - the transform which is applied to the given shape during rendering
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_generate_mtsdf

      public static int nmsdf_generate_mtsdf(long output, long shape, long transform)
      Unsafe version of: generate_mtsdf
    • msdf_generate_mtsdf

      public static int msdf_generate_mtsdf(MSDFGenBitmap output, long shape, MSDFGenTransform transform)
      Parameters:
      output - a pointer to a bitmap that was allocated with bitmap_alloc to which the given shape is rendered. The bitmap must be of type BITMAP_TYPE_MTSDF.
      shape - a pointer to the shape to render to the given bitmap
      transform - the transform which is applied to the given shape during rendering
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_generate_sdf_with_config

      public static int nmsdf_generate_sdf_with_config(long output, long shape, long transform, long config)
      Unsafe version of: generate_sdf_with_config
    • msdf_generate_sdf_with_config

      public static int msdf_generate_sdf_with_config(MSDFGenBitmap output, long shape, MSDFGenTransform transform, MSDFGenConfig config)
      Parameters:
      output - a pointer to a bitmap that was allocated with bitmap_alloc to which the given shape is rendered. The bitmap must be of type BITMAP_TYPE_SDF.
      shape - a pointer to the shape to render to the given bitmap
      transform - the transform which is applied to the given shape during rendering
      config - a pointer to the config which is applied to the sprite generator before rendering
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_generate_psdf_with_config

      public static int nmsdf_generate_psdf_with_config(long output, long shape, long transform, long config)
      Unsafe version of: generate_psdf_with_config
    • msdf_generate_psdf_with_config

      public static int msdf_generate_psdf_with_config(MSDFGenBitmap output, long shape, MSDFGenTransform transform, MSDFGenConfig config)
      Parameters:
      output - a pointer to a bitmap that was allocated with bitmap_alloc to which the given shape is rendered. The bitmap must be of type BITMAP_TYPE_PSDF.
      shape - a pointer to the shape to render to the given bitmap
      transform - the transform which is applied to the given shape during rendering
      config - a pointer to the config which is applied to the sprite generator before rendering
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_generate_msdf_with_config

      public static int nmsdf_generate_msdf_with_config(long output, long shape, long transform, long config)
      Unsafe version of: generate_msdf_with_config
    • msdf_generate_msdf_with_config

      public static int msdf_generate_msdf_with_config(MSDFGenBitmap output, long shape, MSDFGenTransform transform, MSDFGenMultichannelConfig config)
      Parameters:
      output - a pointer to a bitmap that was allocated with bitmap_alloc to which the given shape is rendered. The bitmap must be of type BITMAP_TYPE_MSDF.
      shape - a pointer to the shape to render to the given bitmap
      transform - the transform which is applied to the given shape during rendering
      config - a pointer to the config which is applied to the sprite generator before rendering
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.
    • nmsdf_generate_mtsdf_with_config

      public static int nmsdf_generate_mtsdf_with_config(long output, long shape, long transform, long config)
      Unsafe version of: generate_mtsdf_with_config
    • msdf_generate_mtsdf_with_config

      public static int msdf_generate_mtsdf_with_config(MSDFGenBitmap output, long shape, MSDFGenTransform transform, MSDFGenMultichannelConfig config)
      Parameters:
      output - a pointer to a bitmap that was allocated with bitmap_alloc to which the given shape is rendered. The bitmap must be of type BITMAP_TYPE_MTSDF.
      shape - A pointer to the shape to render to the given bitmap.
      transform - the transform which is applied to the given shape during rendering
      config - a pointer to the config which is applied to the sprite generator before rendering
      Returns:
      SUCCESS on success, otherwise one of the constants prefixed with MSDF_ERR_.