| Flutter Impeller |

Public Member Functions | List of all members
impeller::LineStripVertexWriter Class Reference

A vertex writer that generates a line strip topology. More...

`#include <path_component.h>`

Inheritance diagram for impeller::LineStripVertexWriter:

## Public Member Functions
| LineStripVertexWriter (std::vector< Point > &points)
| ~LineStripVertexWriter ()=default
void | EndContour () override
void | Write (Point point) override
std::pair< size_t, size_t > | GetVertexCount () const
const std::vector< Point > & | GetOversizedBuffer () const

## Detailed Description

A vertex writer that generates a line strip topology.

Definition at line 71 of file path_component.h.

## Constructor & Destructor Documentation

## ◆ LineStripVertexWriter()

impeller::LineStripVertexWriter::LineStripVertexWriter | ( | std::vector< Point > & | points | ) |
| explicit

Definition at line 83 of file path_component.cc.

84 : points_(points) {}

## ◆ ~LineStripVertexWriter()

impeller::LineStripVertexWriter::~LineStripVertexWriter | ( |  | ) |
| default

## Member Function Documentation

## ◆ EndContour()

void impeller::LineStripVertexWriter::EndContour | ( |  | ) |
| override virtual

Implements impeller::VertexWriter.

Definition at line 86 of file path_component.cc.

86 {}

## ◆ GetOversizedBuffer()

const std::vector< Point > & impeller::LineStripVertexWriter::GetOversizedBuffer | ( |  | ) | const

Definition at line 96 of file path_component.cc.

96 {
97 return overflow_;
98 }

Referenced by impeller::Tessellator::GenerateLineStrip().

## ◆ GetVertexCount()

std::pair< size_t, size_t > impeller::LineStripVertexWriter::GetVertexCount | ( |  | ) | const

Definition at line 100 of file path_component.cc.

100 {
101 return std::make_pair(offset_, overflow_.size());
102 }

Referenced by impeller::Tessellator::GenerateLineStrip().

## ◆ Write()

void impeller::LineStripVertexWriter::Write | ( | Point | point | ) |
| override virtual

Implements impeller::VertexWriter.

Definition at line 88 of file path_component.cc.

88 {
89 if (offset_ >= points_.size()) {
90 overflow_.push_back(point);
91 } else {
92 points_[offset_++] = point;
93 }
94 }

The documentation for this class was generated from the following files:

- impeller/geometry/path_component.h
- impeller/geometry/path_component.cc