Structure

GraphicsContext.Shading

A color or pattern that you can use to outline or fill a path.

Declaration 宣言

struct Shading

Overview 概要

Use a shading instance to describe the color or pattern of a path that you outline with a method like stroke(_:with:style:), or of the interior of a region that you fill with the fill(_:with:style:) method. Get a shading instance by calling one of the Shading structure’s factory methods. You can base shading on:

  • A Color.

  • A Gradient.

  • Any type that conforms to ShapeStyle.

  • An Image.

  • What you’ve already drawn into the context.

  • A collection of other shading instances.

Topics 話題

Colors

Other Shape Styles

Images

Composite Shading Types

See Also 参照

Drawing a Path