Skip to content

Most visited

Recently visited

navigation

Paint.Cap

public static final enum Paint.Cap
extends Enum<Paint.Cap>

java.lang.Object
   ↳ java.lang.Enum<android.graphics.Paint.Cap>
     ↳ android.graphics.Paint.Cap


The Cap specifies the treatment for the beginning and ending of stroked lines and paths. The default is BUTT.

Summary

Enum values

Paint.Cap  BUTT

The stroke ends with the path, and does not project beyond it. 

Paint.Cap  ROUND

The stroke projects out as a semicircle, with the center at the end of the path. 

Paint.Cap  SQUARE

The stroke projects out as a square, with the center at the end of the path. 

Public methods

static Paint.Cap valueOf(String name)
static final Cap[] values()

Inherited methods

From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum values

BUTT

added in API level 1
Paint.Cap BUTT

The stroke ends with the path, and does not project beyond it.

ROUND

added in API level 1
Paint.Cap ROUND

The stroke projects out as a semicircle, with the center at the end of the path.

SQUARE

added in API level 1
Paint.Cap SQUARE

The stroke projects out as a square, with the center at the end of the path.

Public methods

valueOf

added in API level 1
Paint.Cap valueOf (String name)

Parameters
name String

Returns
Paint.Cap

values

added in API level 1
Cap[] values ()

Returns
Cap[]

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)