-
public class SnapSticker
Class that holds the sticker data to be overlaid on top of the Snap media.
-
-
Method Summary
Modifier and Type Method Description void
setRotationDegreesClockwise(@FloatRange(from = 0f, to = 360f) float rotation)
The rotation to apply on the sticker. void
setPosX(@FloatRange(from = 0f, to = 1f) float positionX)
Setter for the horizontal position of the sticker. void
setPosY(@FloatRange(from = 0f, to = 1f) float positionY)
Setter for the vertical position of the sticker. void
setWidth(@FloatRange(from = 0f, to = 300f) float width)
Setter for the width of the sticker in pixels. void
setHeight(@FloatRange(from = 0f, to = 300f) float height)
Setter for the height of the sticker in pixels. void
setWidthDp(@FloatRange(from = 0f, to = 300f) float widthDp)
Setter for the width of the sticker in density independent pixels. void
setHeightDp(@FloatRange(from = 0f, to = 300f) float heightDp)
Setter for the height of the sticker in density independent pixels. JSONObject
getJsonForm(@NonNull() Uri stickerUri, Context context)
File
getStickerFile()
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.
-
-