| 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 72 of file path_component.h.

## Constructor & Destructor Documentation

## ◆ LineStripVertexWriter()

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

Definition at line 84 of file path_component.cc.

85 : points_(points) {}

## ◆ ~LineStripVertexWriter()

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

## Member Function Documentation

## ◆ EndContour()

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

Implements impeller::VertexWriter.

Definition at line 87 of file path_component.cc.

87 {}

## ◆ GetOversizedBuffer()

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

Definition at line 97 of file path_component.cc.

97 {
98 return overflow_;
99 }

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

## ◆ GetVertexCount()

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

Definition at line 101 of file path_component.cc.

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

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

## ◆ Write()

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

Implements impeller::VertexWriter.

Definition at line 89 of file path_component.cc.

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

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

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