Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
ellipse_geometry.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include <algorithm>
6
7#include "flutter/impeller/entity/geometry/ellipse_geometry.h"
8
9#include "flutter/impeller/entity/geometry/line_geometry.h"
10
11namespace impeller {
12
13EllipseGeometry::EllipseGeometry(Rect bounds) : bounds_(bounds) {}
14
16 const ContentContext& renderer,
17 const Entity& entity,
18 RenderPass& pass) const {
20 renderer,
21 renderer.GetTessellator()->FilledEllipse(entity.GetTransform(), bounds_),
22 entity, pass);
23}
24
25std::optional<Rect> EllipseGeometry::GetCoverage(
26 const Matrix& transform) const {
27 return bounds_.TransformBounds(transform);
28}
29
31 const Rect& rect) const {
32 return false;
33}
34
36 return false;
37}
38
39} // namespace impeller
std::optional< Rect > GetCoverage(const Matrix &transform) const override
GeometryResult GetPositionBuffer(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
bool CoversArea(const Matrix &transform, const Rect &rect) const override
Determines if this geometry, transformed by the given transform, will completely cover all surface ar...
bool IsAxisAlignedRect() const override
const Matrix & GetTransform() const
Get the global transform matrix for this Entity.
Definition entity.cc:46
static GeometryResult ComputePositionGeometry(const ContentContext &renderer, const Tessellator::VertexGenerator &generator, const Entity &entity, RenderPass &pass)
Definition geometry.cc:24
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition render_pass.h:33
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
Definition p3.cpp:47
A 4x4 matrix using column-major storage.
Definition matrix.h:37
constexpr TRect TransformBounds(const Matrix &transform) const
Creates a new bounding box that contains this transformed rectangle.
Definition rect.h:440