CVidPoly Class


Overview

Note

The CVidPoly class handles drawing polygons and lines

The structure used for this class is CVidPoly


Quick Reference

Quick Ref

void CVidPoly::CVidPoly()

void CVidPoly::~CVidPoly()

void CVidPoly::AdvanceAETEdges()

void CVidPoly::BuildET(_EdgeDescription* pEdgeTableStart)

virtual long __cdecl CVidPoly::CalculateLineVIntersection(CPoint& lineStart, CPoint& lineEnd, const long vertical, CPoint& linePrev) = 0

void CVidPoly::DrawHLine32(void* pSurface, int xMin, int xMax, unsigned long dwColor, CRect& rSurface, CPoint& ptRef)

void CVidPoly::DrawHLineDithered32(void* pSurface, int xMin, int xMax, unsigned long dwColor, CRect& rSurface, CPoint& ptRef)

void CVidPoly::DrawHLineDitheredMirrored32(void* pSurface, int xMin, int xMax, unsigned long dwColor, CRect& rSurface, CPoint& ptRef)

void CVidPoly::DrawHLineMirrored32(void* pSurface, int xMin, int xMax, unsigned long dwColor, CRect& rSurface, CPoint& ptRef)

void CVidPoly::DrawHLineShaded32(void* pSurface, int xMin, int xMax, unsigned long dwColor, CRect& rSurface, CPoint& ptRef)

void CVidPoly::DrawHLineShadedMirrored32(void* pSurface, int xMin, int xMax, unsigned long dwColor, CRect& rSurface, CPoint& ptRef)

int CVidPoly::FillConvexPoly(unsigned short* pSurface, long lSurfacePitch, CRect& rClipRect, unsigned long dwColor, unsigned long dwFlags, CPoint& ptRef)

int CVidPoly::FillPoly(unsigned short* pSurface, long lSurfacePitch, CRect& rClipRect, unsigned long dwColor, unsigned long dwFlags, CPoint& ptRef)

virtual unsigned char __cdecl CVidPoly::IsPtInArc(CPoint& ptEdge, unsigned short nAngle, CPoint& ptCheck) = 0

virtual unsigned char __cdecl CVidPoly::IsPtInPoly(CPoint* pPoly, const short nPoly, CPoint& pt) = 0

virtual void __cdecl CVidPoly::PolygonTest(CPoint* pVertices, unsigned short nVertices, int& bConvex, int& bMonoY) = 0

void CVidPoly::ReSortAET()

void CVidPoly::ScanCurrentHLine(void* pSurface, CRect& rClip, unsigned long dwColor, CPoint& ptRef)

void CVidPoly::SetPoly(unsigned short* pVertices, unsigned short nVertices)

void CVidPoly::SetPoly(CVIDPOLY_VERTEX* pVertices, short nVertices)

void CVidPoly::UpdateAET(int nCurrLine)


Constructors

Name

Description

CVidPoly::CVidPoly

Constructs a CVidPoly object

CVidPoly::CVidPoly

Destroys a CVidPoly object

CVidPoly::CVidPoly

Constructs a CVidPoly object

void CVidPoly::CVidPoly();

Remarks

Constructs a CVidPoly object


CVidPoly::~CVidPoly

Destroys the CVidPoly object

void CVidPoly::~CVidPoly();

Remarks

Destroys the CVidPoly object


Methods

Name

Description

CVidPoly::AdvanceAETEdges

CVidPoly::BuildET

CVidPoly::CalculateLineVIntersection

CVidPoly::DrawHLine32

CVidPoly::DrawHLineDithered32

CVidPoly::DrawHLineDitheredMirrored32

CVidPoly::DrawHLineMirrored32

CVidPoly::DrawHLineShaded32

CVidPoly::DrawHLineShadedMirrored32

CVidPoly::FillConvexPoly

CVidPoly::FillPoly

CVidPoly::IsPtInArc

CVidPoly::IsPtInPoly

CVidPoly::PolygonTest

CVidPoly::ReSortAET

CVidPoly::ScanCurrentHLine

CVidPoly::SetPoly

CVidPoly::UpdateAET


CVidPoly::AdvanceAETEdges

void CVidPoly::AdvanceAETEdges();

Remarks


CVidPoly::BuildET

void CVidPoly::BuildET(_EdgeDescription* pEdgeTableStart);

Parameters

  • _EdgeDescription* pEdgeTableStart -

Remarks


CVidPoly::CalculateLineVIntersection

virtual long __cdecl CVidPoly::CalculateLineVIntersection(
   CPoint& lineStart,
   CPoint& lineEnd,
   const long vertical,
   CPoint& linePrev);

Parameters

Return Value

Returns long

Remarks


CVidPoly::DrawHLine32

void CVidPoly::DrawHLine32(
   void* pSurface,
   int xMin,
   int xMax,
   unsigned long dwColor,
   CRect& rSurface,
   CPoint& ptRef);

Parameters

  • void* pSurface -

  • int xMin -

  • int xMax -

  • unsigned long dwColor -

  • CRect& rSurface -

  • CPoint& ptRef -

Remarks


CVidPoly::DrawHLineDithered32

void CVidPoly::DrawHLineDithered32(
   void* pSurface,
   int xMin,
   int xMax,
   unsigned long dwColor,
   CRect& rSurface,
   CPoint& ptRef);

Parameters

  • void* pSurface -

  • int xMin -

  • int xMax -

  • unsigned long dwColor -

  • CRect& rSurface -

  • CPoint& ptRef -

Remarks


CVidPoly::DrawHLineDitheredMirrored32

void CVidPoly::DrawHLineDitheredMirrored32(
   void* pSurface,
   int xMin,
   int xMax,
   unsigned long dwColor,
   CRect& rSurface,
   CPoint& ptRef);

Parameters

  • void* pSurface -

  • int xMin -

  • int xMax -

  • unsigned long dwColor -

  • CRect& rSurface -

  • CPoint& ptRef -

Remarks


CVidPoly::DrawHLineMirrored32

void CVidPoly::DrawHLineMirrored32(
   void* pSurface,
   int xMin,
   int xMax,
   unsigned long dwColor,
   CRect& rSurface,
   CPoint& ptRef);

Parameters

  • void* pSurface -

  • int xMin -

  • int xMax -

  • unsigned long dwColor -

  • CRect& rSurface -

  • CPoint& ptRef -

Remarks


CVidPoly::DrawHLineShaded32

void CVidPoly::DrawHLineShaded32(
   void* pSurface,
   int xMin,
   int xMax,
   unsigned long dwColor,
   CRect& rSurface,
   CPoint& ptRef);

Parameters

  • void* pSurface -

  • int xMin -

  • int xMax -

  • unsigned long dwColor -

  • CRect& rSurface -

  • CPoint& ptRef -

Remarks


CVidPoly::DrawHLineShadedMirrored32

void CVidPoly::DrawHLineShadedMirrored32(
   void* pSurface,
   int xMin,
   int xMax,
   unsigned long dwColor,
   CRect& rSurface,
   CPoint& ptRef);

Parameters

  • void* pSurface -

  • int xMin -

  • int xMax -

  • unsigned long dwColor -

  • CRect& rSurface -

  • CPoint& ptRef -

Remarks


CVidPoly::FillConvexPoly

int CVidPoly::FillConvexPoly(
   unsigned short* pSurface,
   long lSurfacePitch,
   CRect& rClipRect,
   unsigned long dwColor,
   unsigned long dwFlags,
   CPoint& ptRef);

Parameters

  • unsigned short* pSurface -

  • long lSurfacePitch -

  • CRect& rClipRect -

  • unsigned long dwColor -

  • unsigned long dwFlags -

  • CPoint& ptRef -

Return Value

Returns int

Remarks


CVidPoly::FillPoly

int CVidPoly::FillPoly(
   unsigned short* pSurface,
   long lSurfacePitch,
   CRect& rClipRect,
   unsigned long dwColor,
   unsigned long dwFlags,
   CPoint& ptRef);

Parameters

  • unsigned short* pSurface -

  • long lSurfacePitch -

  • CRect& rClipRect -

  • unsigned long dwColor -

  • unsigned long dwFlags -

  • CPoint& ptRef -

Return Value

Returns int

Remarks


CVidPoly::IsPtInArc

virtual unsigned char __cdecl CVidPoly::IsPtInArc(
   CPoint& ptEdge,
   unsigned short nAngle,
   CPoint& ptCheck);

Parameters

  • CPoint& ptEdge -

  • unsigned short nAngle -

  • CPoint& ptCheck -

Return Value

Returns unsigned char

Remarks


CVidPoly::IsPtInPoly

virtual unsigned char __cdecl CVidPoly::IsPtInPoly(
   CPoint* pPoly,
   const short nPoly,
   CPoint& pt);

Parameters

Return Value

Returns unsigned char

Remarks


CVidPoly::PolygonTest

virtual void __cdecl CVidPoly::PolygonTest(
   CPoint* pVertices,
   unsigned short nVertices,
   int& bConvex,
   int& bMonoY);

Parameters

  • CPoint* pVertices -

  • unsigned short nVertices -

  • int& bConvex -

  • int& bMonoY -

Remarks


CVidPoly::ReSortAET

void CVidPoly::ReSortAET();

Remarks


CVidPoly::ScanCurrentHLine

void CVidPoly::ScanCurrentHLine(
   void* pSurface,
   CRect& rClip,
   unsigned long dwColor,
   CPoint& ptRef);

Parameters

  • void* pSurface -

  • CRect& rClip -

  • unsigned long dwColor -

  • CPoint& ptRef -

Remarks


CVidPoly::SetPoly

void CVidPoly::SetPoly(
   unsigned short* pVertices,
   unsigned short nVertices);

Parameters

  • unsigned short* pVertices -

  • unsigned short nVertices -

Remarks


CVidPoly::SetPoly

void CVidPoly::SetPoly(
   CVIDPOLY_VERTEX* pVertices,
   short nVertices);

Parameters

Remarks


CVidPoly::UpdateAET

void CVidPoly::UpdateAET(int nCurrLine);

Parameters

  • int nCurrLine -

Remarks