| Flutter Impeller |

Macros
widgets.h File Reference
`#include <tuple>`
`#include "impeller/base/strings.h"`
`#include "impeller/geometry/color.h"`
`#include "impeller/geometry/point.h"`
`#include "third_party/imgui/imgui.h"`

Go to the source code of this file.

## Macros
#define | IMPELLER_PLAYGROUND_POINT(default_position, radius, color)
#define | IMPELLER_PLAYGROUND_LINE(default_position_a, default_position_b, radius, color_a, color_b)

## Macro Definition Documentation

## ◆ IMPELLER_PLAYGROUND_LINE

#define IMPELLER_PLAYGROUND_LINE | ( |  | default_position_a,
|  |  | default_position_b,
|  |  | radius,
|  |  | color_a,
|  |  | color_b
| ) |  |

Value:
({ \
impeller::Point position_a = default_position_a; \
impeller::Point position_b = default_position_b; \
float r_ = radius; \
impeller::Color color_a_ = color_a; \
impeller::Color color_b_ = color_b; \
\
position_a = IMPELLER_PLAYGROUND_POINT(position_a, r_, color_a_); \
position_b = IMPELLER_PLAYGROUND_POINT(position_b, r_, color_b_); \
\
auto dir = (position_b - position_a).Normalize() * r_; \
auto line_a = position_a + dir; \
auto line_b = position_b - dir; \
ImGui::GetBackgroundDrawList()->AddLine( \
{line_a.x, line_a.y}, {line_b.x, line_b.y}, \
ImColor(color_b.red, color_b.green, color_b.blue, 0.3f)); \
\
std::make_tuple(position_a, position_b); \
})

Definition at line 55 of file widgets.h.

## ◆ IMPELLER_PLAYGROUND_POINT

#define IMPELLER_PLAYGROUND_POINT | ( |  | default_position,
|  |  | radius,
|  |  | color
| ) |  |

Definition at line 14 of file widgets.h.

IMPELLER_PLAYGROUND_POINT
#define IMPELLER_PLAYGROUND_POINT(default_position, radius, color)
Definition: widgets.h:14
impeller::Point
TPoint< Scalar > Point
Definition: point.h:306