| // Copyright 2017 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| library fuchsia.ui.gfx; |
| |
| // The shapes defined in this file can be used to define the rendered shape of |
| // an `ObjectNode`, and to define the clip region of a `ClipNode`. |
| |
| /// Rectangle centered at (0,0). |
| type RectangleArgs = struct { |
| width Value; // float32 |
| height Value; // float32 |
| }; |
| |
| /// RoundedRectangle centered at (0,0). Legal parameter values must satisfy the |
| /// constraint that the flat sides of the rectangle have non-negative length. |
| /// In other words, the following constraints must hold: |
| /// - top_left_radius + top_right_radius <= width |
| /// - bottom_left_radius + bottom_right_radius <= width |
| /// - top_left_radius + bottom_left_radius <= height |
| /// - top_right_radius + bottom_right_radius <= height |
| type RoundedRectangleArgs = struct { |
| width Value; // float32 |
| height Value; // float32 |
| top_left_radius Value; // float32 |
| top_right_radius Value; // float32 |
| bottom_right_radius Value; // float32 |
| bottom_left_radius Value; // float32 |
| }; |
| |
| type CircleArgs = struct { |
| radius Value; // float32 |
| }; |
| |
| /// A Mesh cannot be rendered until it has been bound to vertex/index buffers; |
| /// see BindMeshBuffersCmd. |
| type MeshArgs = struct {}; |