Package globus.glmap

Class SVGRender

java.lang.Object
globus.glmap.SVGRender

public class SVGRender extends Object
ImageManager renders images from svg format.
  • Constructor Details

    • SVGRender

      public SVGRender()
  • Method Details

    • render

      @Nullable public static android.graphics.Bitmap render(byte[] data, @Nullable SVGRender.Transform transform)
      Renders image from data
      Parameters:
      data - svg data
      transform - transform to use
      Returns:
      Loaded bitmap or null
    • overlayBlend

      @ColorInt public static int overlayBlend(@ColorInt int tint, @ColorInt int color)
      Overlay blend function
      Parameters:
      tint - tint color
      color - source color
      Returns:
      blended color
    • render

      @Nullable public static android.graphics.Bitmap render(@NonNull android.content.res.AssetManager assetManager, @NonNull String path, @Nullable SVGRender.Transform transform)
      Renders image from assetManager and path
      Parameters:
      assetManager - Asset manager used to load data
      path - path to image
      transform - transform to use
      Returns:
      Loaded bitmap or null
    • transform

      public static SVGRender.Transform transform(double scale)
      Helper that generates scale transform
      Parameters:
      scale - scale to apply
      Returns:
      scale transform
    • transform

      public static SVGRender.Transform transform(@ColorInt int tint)
      Helper that generates overlay blend transform
      Parameters:
      tint - tint color
      Returns:
      overlay blend transform
    • transform

      public static SVGRender.Transform transform(double scale, @ColorInt int tint)
      Helper that generates scale and overlay blend transform
      Parameters:
      scale - scale to apply
      tint - tint color
      Returns:
      scale and overlay blend transform