Sdílet prostřednictvím


Paint.StartHyphenEdit Property

Definition

Get the current value of start hyphen edit. -or- Set a start hyphen edit on the paint.

public virtual int StartHyphenEdit { [Android.Runtime.Register("getStartHyphenEdit", "()I", "GetGetStartHyphenEditHandler", ApiSince=29)] get; [Android.Runtime.Register("setStartHyphenEdit", "(I)V", "GetSetStartHyphenEdit_IHandler", ApiSince=29)] set; }
[<get: Android.Runtime.Register("getStartHyphenEdit", "()I", "GetGetStartHyphenEditHandler", ApiSince=29)>]
[<set: Android.Runtime.Register("setStartHyphenEdit", "(I)V", "GetSetStartHyphenEdit_IHandler", ApiSince=29)>]
member this.StartHyphenEdit : int with get, set

Property Value

the current starting hyphen edit value

Attributes

Remarks

Property getter documentation:

Get the current value of start hyphen edit.

The default value is 0 which is equivalent to #START_HYPHEN_EDIT_NO_EDIT.

Java documentation for android.graphics.Paint.getStartHyphenEdit().

Property setter documentation:

Set a start hyphen edit on the paint.

By setting start hyphen edit, the measurement and drawing is performed with modifying hyphenation at the start of line. For example, by passing #START_HYPHEN_EDIT_INSERT_HYPHEN like as follows, HYPHEN(U+2010) character is appended at the start of line.

<code>
              Paint paint = new Paint();
              paint.setStartHyphenEdit(Paint.START_HYPHEN_EDIT_INSERT_HYPHEN);
              paint.measureText("abc", 0, 3);  // Returns the width of "-abc"
              Canvas.drawText("abc", 0, 3, 0f, 0f, paint);  // Draws "-abc"
</code>

The default value is 0 which is equivalent to #START_HYPHEN_EDIT_NO_EDIT.

Java documentation for android.graphics.Paint.setStartHyphenEdit(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to