Flutter Engine
The Flutter Engine
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
14
15GeometryResult EllipseGeometry::GetPositionBuffer(
17 const Entity& entity,
18 RenderPass& pass) const {
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
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
Optional< SkRect > bounds
Definition: SkRecords.h:189
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350
SK_API sk_sp< PrecompileColorFilter > Matrix()
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:463