harmony 鸿蒙drawing_pen.h

  • 2023-06-24
  • 浏览 (423)

drawing_pen.h

Overview

Declares functions related to the pen object in the drawing module.

Since: 8

Related Modules:

Drawing

Summary

Enums

Name Description
OH_Drawing_PenLineCapStyle { LINE_FLAT_CAP, LINE_SQUARE_CAP, LINE_ROUND_CAP } Enumerates line cap styles of a pen. The line cap style defines the style of both ends of a line segment drawn by the pen.
OH_Drawing_PenLineJoinStyle { LINE_MITER_JOIN, LINE_ROUND_JOIN, LINE_BEVEL_JOIN } Enumerates pen line join styles. The line join style defines the shape of the joints of a polyline segment drawn by the pen.

Functions

Name Description
OH_Drawing_PenCreate (void) Creates an OH_Drawing_Pen object.
OH_Drawing_PenDestroy (OH_Drawing_Pen *) Destroys an OH_Drawing_Pen object and reclaims the memory occupied by the object.
OH_Drawing_PenIsAntiAlias (const OH_Drawing_Pen *) Checks whether anti-aliasing is enabled for a pen. If anti-aliasing is enabled, edges will be drawn with partial transparency.
OH_Drawing_PenSetAntiAlias (OH_Drawing_Pen *, bool) Enables or disables anti-aliasing for a pen. If anti-aliasing is enabled, edges will be drawn with partial transparency.
OH_Drawing_PenGetColor (const OH_Drawing_Pen *) Obtains the color of a pen. The color is used by the pen to outline a shape.
OH_Drawing_PenSetColor (OH_Drawing_Pen *, uint32_t color) Sets the color for a pen. The color is used by the pen to outline a shape.
OH_Drawing_PenGetWidth (const OH_Drawing_Pen *) Obtains the thickness of a pen. This thickness determines the width of the outline of a shape.
OH_Drawing_PenSetWidth (OH_Drawing_Pen *, float width) Sets the thickness for a pen. This thickness determines the width of the outline of a shape.
OH_Drawing_PenGetMiterLimit (const OH_Drawing_Pen *) Obtains the stroke miter limit of a polyline drawn by a pen. When the corner type is bevel, a beveled corner is displayed if the miter limit is exceeded, and a mitered corner is displayed if the miter limit is not exceeded.
OH_Drawing_PenSetMiterLimit (OH_Drawing_Pen *, float miter) Sets the stroke miter limit for a polyline drawn by a pen. When the corner type is bevel, a beveled corner is displayed if the miter limit is exceeded, and a mitered corner is displayed if the miter limit is not exceeded.
OH_Drawing_PenGetCap (const OH_Drawing_Pen *) Obtains the line cap style of a pen.
OH_Drawing_PenSetCap (OH_Drawing_Pen *, OH_Drawing_PenLineCapStyle) Sets the line cap style for a pen.
OH_Drawing_PenGetJoin (const OH_Drawing_Pen *) Obtains the line join style of a pen.
OH_Drawing_PenSetJoin (OH_Drawing_Pen *, OH_Drawing_PenLineJoinStyle) Sets the line join style for a pen.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Native APIs

harmony 鸿蒙AVCapability

harmony 鸿蒙AVDemuxer

harmony 鸿蒙AVMuxer

harmony 鸿蒙AVScreenCapture

harmony 鸿蒙AVSource

harmony 鸿蒙AudioDecoder

harmony 鸿蒙AudioEncoder

harmony 鸿蒙CodecBase

harmony 鸿蒙Core

0  赞