Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::canvas::Parallelogram Struct Reference

Parallelogram — a skewed rectangle defined by base point and two edge vectors. More...

#include <text_layout.hpp>

Public Member Functions

bool contains (float px, float py) const
 Check if a point is inside.

Static Public Member Functions

static Parallelogram from_rect_shear (float x, float y, float w, float h, float shear)
 Create from a rectangle with horizontal shear.

Public Attributes

float x0 = 0
float y0 = 0
 Top-left corner.
float x1 = 0
float y1 = 0
 Top-right corner.
float x2 = 0
float y2 = 0
 Bottom-right corner.
float x3 = 0
float y3 = 0
 Bottom-left corner.

Detailed Description

Parallelogram — a skewed rectangle defined by base point and two edge vectors.

Member Function Documentation

◆ contains()

bool pulp::canvas::Parallelogram::contains ( float px,
float py ) const
inline

Check if a point is inside.

◆ from_rect_shear()

Parallelogram pulp::canvas::Parallelogram::from_rect_shear ( float x,
float y,
float w,
float h,
float shear )
inlinestatic

Create from a rectangle with horizontal shear.

Member Data Documentation

◆ x0

float pulp::canvas::Parallelogram::x0 = 0

◆ x1

float pulp::canvas::Parallelogram::x1 = 0

◆ x2

float pulp::canvas::Parallelogram::x2 = 0

◆ x3

float pulp::canvas::Parallelogram::x3 = 0

◆ y0

float pulp::canvas::Parallelogram::y0 = 0

Top-left corner.

◆ y1

float pulp::canvas::Parallelogram::y1 = 0

Top-right corner.

◆ y2

float pulp::canvas::Parallelogram::y2 = 0

Bottom-right corner.

◆ y3

float pulp::canvas::Parallelogram::y3 = 0

Bottom-left corner.


The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/canvas/include/pulp/canvas/text_layout.hpp