Resource Base
Table of contents

Quadrilateral

The Quadrilateral class represents a quadrilateral shape in 2D space. It contains an array of four Point objects, which represent the vertices of the quadrilateral.

Definition

Module: dynamsoft_core

class Quadrilateral(object) 

Properties

Property Type Description
points List[Point] A Point list of length 4 that define the quadrilateral.

Methods

Method Description
__init__ Initializes a new instance of the Quadrilateral class with default values.
contains Determines whether a point is inside the quadrilateral
get_area Gets the area of the quadrilateral.

__init__

Initializes a new instance of the Quadrilateral class with default values.

def __init__(self):

contains

Determines whether a point is inside the quadrilateral.

def contains(self, point: "Point") -> bool:

Parameters

point The point to test.

Return Value

Returns true if the point inside the quadrilateral, false otherwise.

See Also

Point

get_area

Gets the area of the quadrilateral.

def get_area(self) -> int:

Return Value

RReturns the area of the quadrilateral.

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article:

latest version

    Change +