Package globus.glmap
Class SVGRender
java.lang.Object
globus.glmap.SVGRender
ImageManager
renders images from svg format.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Callbacks to transform SVG data -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
overlayBlend
(int tint, int color) Overlay blend functionstatic android.graphics.Bitmap
render
(byte[] data, SVGRender.Transform transform) Renders image from datastatic android.graphics.Bitmap
render
(android.content.res.AssetManager assetManager, String path, SVGRender.Transform transform) Renders image from assetManager and pathstatic SVGRender.Transform
transform
(double scale) Helper that generates scale transformstatic SVGRender.Transform
transform
(double scale, int tint) Helper that generates scale and overlay blend transformstatic SVGRender.Transform
transform
(int tint) Helper that generates overlay blend transform
-
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 datatransform
- 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 colorcolor
- 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 datapath
- path to imagetransform
- transform to use- Returns:
- Loaded bitmap or null
-
transform
Helper that generates scale transform- Parameters:
scale
- scale to apply- Returns:
- scale transform
-
transform
Helper that generates overlay blend transform- Parameters:
tint
- tint color- Returns:
- overlay blend transform
-
transform
Helper that generates scale and overlay blend transform- Parameters:
scale
- scale to applytint
- tint color- Returns:
- scale and overlay blend transform
-