Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

ContentDrawScope

abstract class ContentDrawScope : DrawScope
kotlin.Any
   ↳ androidx.ui.graphics.drawscope.DrawScope
   ↳ androidx.ui.core.ContentDrawScope

Receiver scope for drawing content into a layout, where the content can be drawn between other canvas operations. If drawContent is not called, the contents of the layout will not be drawn.

Summary

Public constructors

Receiver scope for drawing content into a layout, where the content can be drawn between other canvas operations.

Public methods
abstract Unit

Causes child drawing operations to run during the onPaint lambda.

Inherited functions
Inherited extension functions
From androidx.ui.layout
Constraints

Creates the Constraints corresponding to the current DpConstraints.

DpConstraints

Creates the DpConstraints corresponding to the current Constraints.

From androidx.ui.graphics.drawscope
Unit
DrawScope.clipPath(path: Path, clipOp: ClipOp = ClipOp.intersect, block: DrawScope.() -> Unit)

Reduces the clip region to the intersection of the current clip and the given rounded rectangle.

Unit
DrawScope.clipRect(left: Float = 0.0f, top: Float = 0.0f, right: Float = size.width, bottom: Float = size.height, clipOp: ClipOp = ClipOp.intersect, block: DrawScope.() -> Unit)

Reduces the clip region to the intersection of the current clip and the given rectangle indicated by the given left, top, right and bottom bounds.

Unit
DrawScope.drawCanvas(block: (Canvas, Size) -> Unit)

Provides access to draw directly with the underlying Canvas along with the current size of the DrawScope.

Unit
DrawScope.inset(left: Float, top: Float, right: Float, bottom: Float, block: DrawScope.() -> Unit)

Simultaneously translate the DrawScope coordinate space by left and top as well as modify the dimensions of the current painting area.

Unit
DrawScope.inset(dx: Float = 0.0f, dy: Float = 0.0f, block: DrawScope.() -> Unit)

Convenience method modifies the DrawScope bounds to inset both left and right bounds by dx as well as the top and bottom by dy.

Unit
DrawScope.rotate(degrees: Float, pivotX: Float = center.x, pivotY: Float = center.y, block: DrawScope.() -> Unit)

Add a rotation (in degrees clockwise) to the current transform at the given pivot point.

Unit
DrawScope.rotateRad(radians: Float, pivotX: Float = center.x, pivotY: Float = center.y, block: DrawScope.() -> Unit)

Add a rotation (in radians clockwise) to the current transform at the given pivot point.

Unit
DrawScope.scale(scaleX: Float, scaleY: Float = scaleX, pivotX: Float = center.x, pivotY: Float = center.y, block: DrawScope.() -> Unit)

Add an axis-aligned scale to the current transform, scaling by the first argument in the horizontal direction and the second in the vertical direction at the given pivot coordinate.

Unit
DrawScope.translate(left: Float = 0.0f, top: Float = 0.0f, block: DrawScope.() -> Unit)

Translate the coordinate space by the given delta in pixels in both the x and y coordinates respectively

Unit
DrawScope.withTransform(transformBlock: DrawTransform.() -> Unit, drawBlock: DrawScope.() -> Unit)

Perform 1 or more transformations and execute drawing commands with the specified transformations applied.

From androidx.ui.graphics
Unit
DrawScope.drawOutline(outline: Outline, color: Color, @FloatRange(0.0, 1.0) alpha: Float = 1.0f, style: DrawStyle = Fill, colorFilter: ColorFilter? = null, blendMode: BlendMode = DrawScope.DefaultBlendMode)

Draws the Outline on a DrawScope.

Unit
DrawScope.drawOutline(outline: Outline, brush: Brush, @FloatRange(0.0, 1.0) alpha: Float = 1.0f, style: DrawStyle = Fill, colorFilter: ColorFilter? = null, blendMode: BlendMode = DrawScope.DefaultBlendMode)

Draws the Outline on a DrawScope.

Inherited properties

Public constructors

<init>

ContentDrawScope()

Receiver scope for drawing content into a layout, where the content can be drawn between other canvas operations. If drawContent is not called, the contents of the layout will not be drawn.

See Also

Public methods

drawContent

abstract fun drawContent(): Unit

Causes child drawing operations to run during the onPaint lambda.