⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flexpath.hpp

📁 FlexGraphics是一套创建矢量图形的VCL组件
💻 HPP
字号:
// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Flexpath.pas' rev: 10.00

#ifndef FlexpathHPP
#define FlexpathHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Flexutils.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Flexpath
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TPointType { ptNode, ptEndNode, ptEndNodeClose, ptControl };
#pragma option pop

typedef DynamicArray<Types::TPoint >  TPointArray;

typedef DynamicArray<TPointType >  TPointTypeArray;

typedef DynamicArray<bool >  TSelectedArray;

typedef DynamicArray<Types::TRect >  TRectArray;

#pragma option push -b-
enum TPathEditFunc { pfOffset, pfJoin, pfBreak, pfClose, pfToLine, pfToCurve };
#pragma option pop

typedef Set<TPathEditFunc, pfOffset, pfToCurve>  TPathEditFuncs;

struct TPathEditParams;
typedef TPathEditParams *PPathEditParams;

struct TPathEditParams
{
	
public:
	#pragma pack(push,1)
	Types::TPoint Offset;
	#pragma pack(pop)
	bool MoveControls;
} ;

struct TNearestPoint;
typedef TNearestPoint *PNearestPoint;

struct TNearestPoint
{
	
public:
	#pragma pack(push,1)
	Types::TPoint Point;
	#pragma pack(pop)
	int Index0;
	int Index1;
	int MinIndex;
	float MinSqrDist;
	float CurvePos;
	bool IsNewMin;
} ;

struct TPathFigureInfo;
typedef TPathFigureInfo *PPathFigureInfo;

struct TPathFigureInfo
{
	
public:
	int FirstNode;
	int LastNode;
	int LastPoint;
	bool IsClosed;
	bool IsCurve;
} ;

typedef DynamicArray<TPathFigureInfo >  TPathFigureInfos;

struct TPathInfo;
typedef TPathInfo *PPathInfo;

struct TPathInfo
{
	
public:
	int PointCount;
	bool IsCurve;
	DynamicArray<TPathFigureInfo >  Figures;
} ;

#pragma option push -b-
enum TRerouteMode { rmAlways, rmAsNeeded, rmNever };
#pragma option pop

struct TRerouteParams;
typedef TRerouteParams *PRerouteParams;

struct TRerouteParams
{
	
public:
	#pragma pack(push,1)
	Types::TRect RangeA;
	#pragma pack(pop)
	#pragma pack(push,1)
	Types::TRect RangeB;
	#pragma pack(pop)
	TRerouteMode Mode;
	bool Ortogonal;
	int LinkMinGap;
	bool SelfLink;
	#pragma pack(push,1)
	Types::TPoint LinkPointA;
	#pragma pack(pop)
	#pragma pack(push,1)
	Types::TPoint LinkPointB;
	#pragma pack(pop)
} ;

//-- var, const, procedure ---------------------------------------------------
extern PACKAGE bool __fastcall PointOnLine(const Types::TPoint &p, const Types::TPoint &p0, const Types::TPoint &p1, int StrokeWidth, Classes::TList* ScanLinePoints = (Classes::TList*)(0x0), PNearestPoint Nearest = (void *)(0x0));
extern PACKAGE bool __fastcall CalcPath(const TPointArray Points, const TPointTypeArray Types, Types::TRect &Range, PPathInfo Info = (void *)(0x0));
extern PACKAGE bool __fastcall CreatePath(HDC DC, const TPointArray Points, const TPointTypeArray Types, bool UseClosed, bool UseNotClosed, bool &Complete, bool OriginalBezier = false, PPathInfo Info = (void *)(0x0));
extern PACKAGE bool __fastcall PointOnPath(const TPointArray Points, const TPointTypeArray Types, const Types::TPoint &Point, bool Stroked, bool Filled, int StrokeWidth = 0x0, PNearestPoint Nearest = (void *)(0x0), PPathInfo Info = (void *)(0x0), Windows::PSingle LengthPos = (void *)(0x0));
extern PACKAGE float __fastcall PathLength(const TPointArray Points, const TPointTypeArray Types, PPathInfo Info = (void *)(0x0));
extern PACKAGE bool __fastcall PathLengthPos(const TPointArray Points, const TPointTypeArray Types, float PathPos, PNearestPoint Nearest, PPathInfo Info = (void *)(0x0));
extern PACKAGE bool __fastcall FlattenPath(TPointArray &Points, TPointTypeArray &Types, float Curvature, PPathInfo Info = (void *)(0x0));
extern PACKAGE int __fastcall InsertPathPoint(TPointArray &Points, TPointTypeArray &Types, int FirstIndex, int NextIndex, const Types::TPoint &Point, int StickThreshold = 0x0, PPathInfo Info = (void *)(0x0));
extern PACKAGE bool __fastcall FindNearestPathSegment(const TPointArray Points, const TPointTypeArray Types, const Types::TPoint &Point, int &FirstIndex, int &NextIndex, PNearestPoint Nearest = (void *)(0x0), PPathInfo Info = (void *)(0x0), bool ForInsert = true);
extern PACKAGE int __fastcall InsertNearestPoint(TPointArray &Points, TPointTypeArray &Types, const Types::TPoint &Point, int StickThreshold = 0x0, PPathInfo Info = (void *)(0x0));
extern PACKAGE TPathEditFuncs __fastcall GetEditPathCaps(const TPointArray Points, const TPointTypeArray Types, const TSelectedArray Selected);
extern PACKAGE bool __fastcall EditPath(TPointArray &Points, TPointTypeArray &Types, const TSelectedArray Selected, TPathEditFunc Func, PPathEditParams Params = (void *)(0x0))/* overload */;
extern PACKAGE bool __fastcall EditPath(TPointArray &Points, TPointTypeArray &Types, int const * Indexes, const int Indexes_Size, TPathEditFunc Func, PPathEditParams Params = (void *)(0x0))/* overload */;
extern PACKAGE bool __fastcall ConnectorReroute(TPointArray &Points, TPointTypeArray &PointTypes, const TRerouteParams &Params);
extern PACKAGE void __fastcall GetPathInfo(const TPointArray Points, const TPointTypeArray Types, TPathInfo &Info);
extern PACKAGE int __fastcall GetFigureIndex(const TPathInfo &Info, int PointIndex);
extern PACKAGE bool __fastcall ChangePathCount(TPointArray &Points, TPointTypeArray &Types, int Index, int Delta);

}	/* namespace Flexpath */
using namespace Flexpath;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Flexpath

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -