-
public class SnapStickerClass that holds the sticker data to be overlaid on top of the Snap media.
-
-
Method Summary
Modifier and Type Method Description voidsetRotationDegreesClockwise(@FloatRange(from = 0f, to = 360f) float rotation)The rotation to apply on the sticker. voidsetPosX(@FloatRange(from = 0f, to = 1f) float positionX)Setter for the horizontal position of the sticker. voidsetPosY(@FloatRange(from = 0f, to = 1f) float positionY)Setter for the vertical position of the sticker. voidsetWidth(@FloatRange(from = 0f, to = 300f) float width)Setter for the width of the sticker in pixels. voidsetHeight(@FloatRange(from = 0f, to = 300f) float height)Setter for the height of the sticker in pixels. voidsetWidthDp(@FloatRange(from = 0f, to = 300f) float widthDp)Setter for the width of the sticker in density independent pixels. voidsetHeightDp(@FloatRange(from = 0f, to = 300f) float heightDp)Setter for the height of the sticker in density independent pixels. JSONObjectgetJsonForm(@NonNull() Uri stickerUri, Context context)FilegetStickerFile()Getter for the sticker file. -
-
Method Detail
-
setRotationDegreesClockwise
void setRotationDegreesClockwise(@FloatRange(from = 0f, to = 360f) float rotation)
The rotation to apply on the sticker.
- Parameters:
rotation- Value in degrees to rotate clockwise.
-
setPosX
void setPosX(@FloatRange(from = 0f, to = 1f) float positionX)
Setter for the horizontal position of the sticker.
- Parameters:
positionX- horizontal position in the range of 0-1 to place the center of the sticker.
-
setPosY
void setPosY(@FloatRange(from = 0f, to = 1f) float positionY)
Setter for the vertical position of the sticker.
- Parameters:
positionY- vertical position in the range 0-1 to place the center of the sticker.
-
setWidth
@Deprecated() void setWidth(@FloatRange(from = 0f, to = 300f) float width)
Setter for the width of the sticker in pixels.
- Parameters:
width- The width of the sticker in pixels.
-
setHeight
@Deprecated() void setHeight(@FloatRange(from = 0f, to = 300f) float height)
Setter for the height of the sticker in pixels.
- Parameters:
height- The height of the sticker in pixels.
-
setWidthDp
void setWidthDp(@FloatRange(from = 0f, to = 300f) float widthDp)
Setter for the width of the sticker in density independent pixels.
- Parameters:
widthDp- The width of the sticker in dp.
-
setHeightDp
void setHeightDp(@FloatRange(from = 0f, to = 300f) float heightDp)
Setter for the height of the sticker in density independent pixels.
- Parameters:
heightDp- The height of the sticker in dp.
-
getJsonForm
JSONObject getJsonForm(@NonNull() Uri stickerUri, Context context)
-
getStickerFile
@NonNull() File getStickerFile()
Getter for the sticker file.
-
-
-
-