Appwrite. Consts. ImageGravity
(appwrite v1.0.0)
View Source
Image crop/positioning gravity values for the Appwrite Storage preview endpoint.
| Gravity | Value |
|---|---|
| Center | "center" |
| Top-left | "top-left" |
| Top | "top" |
| Top-right | "top-right" |
| Left | "left" |
| Right | "right" |
| Bottom-left | "bottom-left" |
| Bottom | "bottom" |
| Bottom-right | "bottom-right" |
Summary
Functions
Returns true when value is a valid image gravity, otherwise false.
Guard — returns true when value is a valid image gravity.
Returns {:ok, value} if valid, or {:error, "Invalid image gravity"}.
Returns value if valid. Raises ArgumentError otherwise.
Returns all valid image gravity values.
Functions
Returns true when value is a valid image gravity, otherwise false.
Guard — returns true when value is a valid image gravity.
Can be used in function heads:
def handle(v) when Elixir.Appwrite.Consts.ImageGravity.valid_value(v), do: :ok
Returns {:ok, value} if valid, or {:error, "Invalid image gravity"}.
Returns value if valid. Raises ArgumentError otherwise.
@spec values() :: [String.t()]
Returns all valid image gravity values.