# Glyph


```
public final class Glyph implements Parcelable
```

<br />

*** ** * ** ***

Defines a glyph, which is the element at the center of a marker icon. By default, this is a circle, but can be configured to have a different color, or set to some text or url. We don't render the glyph when it's explicitly set to the empty string.

## Summary

| ### Constants |
|---|---|
| `static final float` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#DEFAULT_CIRCLE_RADIUS_DP() = 5.0f` The default radius of the glyph in dp. |
| `static final int` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#DEFAULT_COLOR() = -5041134` The default color of the glyph in ARGB format. |
| `static final int` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#DEFAULT_COLOR_ABGR() = -15592269` The default color of the glyph in ABGR format. |
| `static final float` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#X_COORDINATE_DP() = 13.0f` The default x coordinate of the glyph in dp. |
| `static final float` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#Y_COORDINATE_DP() = 13.0f` The default y coordinate of the glyph in dp. |

| ### Public fields |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/ColorInt.html int` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#color()` |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ImageView` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#image()` |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#text()` |

| ### Public methods |
|---|---|
| `boolean` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#equals(java.lang.Object)(@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Object.html other)` |
| `static @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#fromCircle()()` Creates a glyph instance using the default circle. |
| `static @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#fromColor(int)(@https://developer.android.com/reference/androidx/annotation/ColorInt.html int color)` Creates a glyph instance with a custom color and default circle. |
| `static @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#fromText(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html text)` Creates a glyph instance with the specified text. |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt.html int` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#getColor()()` Returns the ARGB color of the glyph. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ImageView` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#getImage()()` Returns the ImageView (reference to the PNG image) of the entire glyph contents. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#getText()()` Returns the text of the glyph. |
| `int` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#hashCode()()` |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#setColor(int)(@https://developer.android.com/reference/androidx/annotation/ColorInt.html int color)` Sets the ARGB color of the glyph. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#setImage(com.google.android.gms.maps3d.model.ImageView)(@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ImageView image)` Sets the ImageView (png image contents of the entire glyph) to draw the image to render the entire glyph contents. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#setText(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html text)` Sets the text of the glyph. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Glyph#writeToParcel(android.os.Parcel,int)(@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/android/os/Parcel.html out, int flags)` |

### Inherited Constants

From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) `static final int` `https://developer.android.com/reference/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR = 1` `static final int` `https://developer.android.com/reference/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE = 1`

### Inherited methods

From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) `abstract int` `https://developer.android.com/reference/android/os/Parcelable.html#describeContents()()`

## Constants

### DEFAULT_CIRCLE_RADIUS_DP

```
public static final float DEFAULT_CIRCLE_RADIUS_DP = 5.0f
```

The default radius of the glyph in dp.

### DEFAULT_COLOR

```
public static final int DEFAULT_COLOR = -5041134
```

The default color of the glyph in ARGB format.

### DEFAULT_COLOR_ABGR

```
public static final int DEFAULT_COLOR_ABGR = -15592269
```

The default color of the glyph in ABGR format.

### X_COORDINATE_DP

```
public static final float X_COORDINATE_DP = 13.0f
```

The default x coordinate of the glyph in dp.

### Y_COORDINATE_DP

```
public static final float Y_COORDINATE_DP = 13.0f
```

The default y coordinate of the glyph in dp.

## Public fields

### color

```
public @ColorInt int color
```

### image

```
public @Nullable ImageView image
```

### text

```
public @Nullable String text
```

## Public methods

### equals

```
public boolean equals(@Nullable Object other)
```

### fromCircle

```
public static @NonNull Glyph fromCircle()
```

Creates a glyph instance using the default circle.

### fromColor

```
public static @NonNull Glyph fromColor(@ColorInt int color)
```

Creates a glyph instance with a custom color and default circle.

### fromText

```
public static @NonNull Glyph fromText(@NonNull String text)
```

Creates a glyph instance with the specified text.

### getColor

```
public @ColorInt int getColor()
```

Returns the ARGB color of the glyph.

### getImage

```
public @Nullable ImageView getImage()
```

Returns the ImageView (reference to the PNG image) of the entire glyph contents.

### getText

```
public @Nullable String getText()
```

Returns the text of the glyph.

### hashCode

```
public int hashCode()
```

### setColor

```
public void setColor(@ColorInt int color)
```

Sets the ARGB color of the glyph. Sets a color filter over the image glyph.

### setImage

```
public void setImage(@NonNull ImageView image)
```

Sets the ImageView (png image contents of the entire glyph) to draw the image to render the entire glyph contents. Replaces all previous glyph context except for color.

### setText

```
public void setText(@NonNull String text)
```

Sets the text of the glyph. This does not affect the image glyph.

### writeToParcel

```
public void writeToParcel(@NonNull Parcel out, int flags)
```