Compartilhar via


Funções GraphicsPath

O Windows GDI+ expõe uma API simples composta por cerca de 600 funções, que são implementadas em Gdiplus.dll e declaradas em Gdiplusflat.h. As funções na API simples do GDI+ são encapsuladas por uma coleção de cerca de 40 classes C++. É recomendável que você não chame as funções na API simples diretamente. Sempre que fizer chamadas para o GDI+, você deve fazê-las chamando os métodos e funções fornecidos pelos wrappers C++. Os Serviços de Suporte ao Produto da Microsoft não fornecerão suporte para o código que chamar a API simples diretamente. Para obter mais informações sobre como usar esses métodos wrapper, confira API Simples do GDI+.

As seguintes funções de API simples são encapsuladas pela classe GraphicsPath C++.

Funções GraphicsPath e Métodos Wrapper Correspondentes

Função simples Método wrapper Comentários
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fillMode, GpPath **path)
GraphicsPath::GraphicsPath(IN FillMode fillMode = FillModeAlternate) Cria um objeto GraphicsPath e inicializa o modo de preenchimento. Esse é o construtor padrão.
GpStatus WINGDIPAPI GdipCreatePath2(GDIPCONST GpPointF* points, GDIPCONST BYTE* types, INT count, GpFillMode fillMode, GpPath **path)
GraphicsPath::GraphicsPath(IN const PointF* points, IN const BYTE* types, IN INT count, IN FillMode fillMode = FillModeAlternate) Cria um objeto GraphicsPath com base em uma matriz de pontos, uma matriz de tipos e um modo de preenchimento.
GpStatus WINGDIPAPI GdipCreatePath2I(GDIPCONST GpPoint* points, GDIPCONST BYTE* types, INT count, GpFillMode fillMode, GpPath **path)
GraphicsPath::GraphicsPath(IN const Point* points, IN const BYTE* types, IN INT count, IN FillMode fillMode = FillModeAlternate) Cria um objeto GraphicsPath com base em uma matriz de pontos, uma matriz de tipos e um modo de preenchimento.
GpStatus WINGDIPAPI GdipClonePath(GpPath* path, GpPath **clonePath)
GraphicsPath::GraphicsPath* Clone() const Cria um novo objeto GraphicsPath e o inicializa com o conteúdo desse objeto GraphicsPath.
GpStatus WINGDIPAPI GdipDeletePath(GpPath* path)
GraphicsPath::~GraphicsPath()
Libera recursos usados pelo objeto GraphicsPath.
GpStatus WINGDIPAPI GdipResetPath(GpPath* path)
GraphicsPath::Reset Esvazia o caminho e define o modo de preenchimento como FillModeAlternate.
GpStatus WINGDIPAPI GdipGetPointCount(GpPath* path, INT* count)
INT GraphicsPath::GetPointCount Obtém o número de pontos na matriz de pontos de dados deste caminho. Isso é o mesmo que o número de tipos na matriz de tipos de ponto do caminho.
GpStatus WINGDIPAPI GdipGetPathTypes(GpPath* path, BYTE* types, INT count)
Status GraphicsPath::GetPathTypes(OUT BYTE* types, IN INT count) const Obtém a matriz de tipos de ponto deste caminho.
GpStatus WINGDIPAPI GdipGetPathPoints(GpPath*, GpPointF* points, INT count)
Status GraphicsPath::GetPathPoints(OUT PointF* points, IN INT count) const Obtém a matriz de pontos deste caminho. A matriz contém os pontos de extremidade e os pontos de controle das linhas e splines de Bézier que são usados para desenhar o caminho.
GpStatus WINGDIPAPI GdipGetPathPointsI(GpPath*, GpPoint* points, INT count)
Status GraphicsPath::GetPathPoints(OUT Point* points, IN INT count) const Obtém a matriz de pontos deste caminho. A matriz contém os pontos de extremidade e os pontos de controle das linhas e splines de Bézier que são usados para desenhar o caminho.
GpStatus WINGDIPAPI GdipGetPathFillMode(GpPath *path, GpFillMode *fillmode)
FillMode GraphicsPath::GetFillMode() const Obtém o modo de preenchimento deste caminho.
GpStatus WINGDIPAPI GdipSetPathFillMode(GpPath *path, GpFillMode fillmode)
Status GraphicsPath::SetFillMode(IN FillMode fillmode) Define o modo de preenchimento deste caminho.
GpStatus WINGDIPAPI GdipGetPathData(GpPath *path, GpPathData* pathData)
Status GraphicsPath::GetPathData(OUT PathData* pathData) const Obtém uma matriz de pontos e uma matriz de tipos de ponto deste caminho. Juntas, essas duas matrizes definem as linhas, as curvas, as figuras e os marcadores deste caminho.
GpStatus WINGDIPAPI GdipStartPathFigure(GpPath *path)
Status GraphicsPath::StartFigure() Inicia uma nova figura sem fechar a figura atual. Os pontos subsequentes adicionados a este caminho são adicionados à nova figura.
GpStatus WINGDIPAPI GdipClosePathFigure(GpPath *path)
Status GraphicsPath::CloseFigure() Fecha a figura atual deste caminho.
GpStatus WINGDIPAPI GdipClosePathFigures(GpPath *path)
Status GraphicsPath::CloseAllFigures() Fecha todas as figuras abertas neste caminho.
GpStatus WINGDIPAPI GdipSetPathMarker(GpPath* path)
Status GraphicsPath::SetMarker() Designa o último ponto neste caminho como um ponto de marcador.
GpStatus WINGDIPAPI GdipClearPathMarkers(GpPath* path)
Status GraphicsPath::ClearMarkers() Limpa os marcadores deste caminho.
GpStatus WINGDIPAPI GdipReversePath(GpPath* path)
Status GraphicsPath::Reverse() Inverte a ordem dos pontos que definem as linhas e as curvas deste caminho.
GpStatus WINGDIPAPI GdipGetPathLastPoint(GpPath* path, GpPointF* lastPoint)
Status GraphicsPath::GetLastPoint(OUT PointF* lastPoint) const Obtém o ponto final da última figura neste caminho.
GpStatus WINGDIPAPI GdipAddPathLine(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2)
Status GraphicsPath::AddLine(IN REAL x1, IN REAL y1, IN REAL x2, IN REAL y2) Adiciona uma linha à figura atual deste caminho.
GpStatus WINGDIPAPI GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points, INT count)
Status GraphicsPath::AddLines(IN const PointF* points, IN INT count) Adiciona uma sequência de linhas conectadas à figura atual deste caminho.
GpStatus WINGDIPAPI GdipAddPathArc(GpPath *path, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
Status GraphicsPath::AddArc(IN REAL x, IN REAL y, IN REAL width, IN REAL height, IN REAL startAngle, IN REAL sweepAngle) Adiciona um arco elíptico à figura atual deste caminho.
GpStatus WINGDIPAPI GdipAddPathBezier(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2, REAL x3, REAL y3, REAL x4, REAL y4)
Status GraphicsPath::AddBezier(IN REAL x1, IN REAL y1, IN REAL x2, IN REAL y2, IN REAL x3, IN REAL y3, IN REAL x4, IN REAL y4) Adiciona um spline de Bézier à figura atual deste caminho.
GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath *path, GDIPCONST GpPointF *points, INT count)
Status GraphicsPath::AddBeziers(IN const PointF* points, IN INT count) Adiciona uma sequência de splines de Bézier conectados à figura atual desse caminho.
GpStatus WINGDIPAPI GdipAddPathCurve(GpPath *path, GDIPCONST GpPointF *points, INT count)
Status GraphicsPath::AddCurve(IN const PointF* points, IN INT count) Adiciona um spline cardinal à figura atual deste caminho.
GpStatus WINGDIPAPI GdipAddPathCurve2(GpPath *path, GDIPCONST GpPointF *points, INT count, REAL tension)
Status GraphicsPath::AddCurve(IN const PointF* points, IN INT count, IN REAL tension) Adiciona um spline cardinal à figura atual deste caminho.
GpStatus WINGDIPAPI GdipAddPathCurve3(GpPath *path, GDIPCONST GpPointF *points, INT count, INT offset, INT numberOfSegments, REAL tension)
Status GraphicsPath::AddCurve(IN const PointF* points, IN INT count, IN INT offset, IN INT numberOfSegments, IN REAL tension) Adiciona um spline cardinal à figura atual deste caminho.
GpStatus WINGDIPAPI GdipAddPathClosedCurve(GpPath *path, GDIPCONST GpPointF *points, INT count)
Status GraphicsPath::AddClosedCurve(IN const PointF* points, IN INT count) Adiciona um spline cardinal fechado a este caminho.
GpStatus WINGDIPAPI GdipAddPathClosedCurve2(GpPath *path, GDIPCONST GpPointF *points, INT count, REAL tension)
Status GraphicsPath::AddClosedCurve(IN const PointF* points, IN INT count, IN REAL tension) Adiciona um spline cardinal fechado a este caminho.
GpStatus WINGDIPAPI GdipAddPathRectangle(GpPath *path, REAL x, REAL y, REAL width, REAL height)
Status GraphicsPath::AddRectangle(IN const RectF& rect) Adiciona um retângulo a esse caminho.
Os parâmetros x, y, largura e altura na função flat especificam um retângulo que corresponde ao parâmetro rect no método wrapper.
GpStatus WINGDIPAPI GdipAddPathRectangles(GpPath *path, GDIPCONST GpRectF *rects, INT count)
Status GraphicsPath::AddRectangles(IN const RectF* rects, IN INT count) Adiciona uma sequência de retângulos a este caminho.
GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath *path, REAL x, REAL y, REAL width, REAL height)
Status GraphicsPath::AddEllipse(IN REAL x, IN REAL y, IN REAL width, IN REAL height) Adiciona uma ellipse a este caminho.
GpStatus WINGDIPAPI GdipAddPathPie(GpPath *path, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
Status GraphicsPath::AddPie(IN REAL x, IN REAL y, IN REAL width, IN REAL height, IN REAL startAngle, IN REAL sweepAngle) Adiciona uma pizza a este caminho. Um arco é uma parte de uma elipse, e uma pizza é uma parte da área delimitada por uma elipse. Uma pizza é delimitada por um arco e duas linhas (bordas) que vão do centro da elipse para os pontos de extremidade do arco.
GpStatus WINGDIPAPI GdipAddPathPolygon(GpPath *path, GDIPCONST GpPointF *points, INT count)
Status GraphicsPath::AddPolygon(IN const PointF* points, IN INT count) Adiciona um polígono a esse caminho.
GpStatus WINGDIPAPI GdipAddPathPath(GpPath *path, GDIPCONST GpPath* addingPath, BOOL connect)
Status GraphicsPath::AddPath(IN const GraphicsPath* addingPath, IN BOOL connect) Adiciona um caminho a este caminho.
GpStatus WINGDIPAPI GdipAddPathString(GpPath *path, GDIPCONST WCHAR *string, INT length, GDIPCONST GpFontFamily *family, INT style, REAL emSize, GDIPCONST RectF *layoutRect, GDIPCONST GpStringFormat *format)
Status GraphicsPath::AddString( IN const WCHAR *string, IN INT length, IN const FontFamily *family, IN INT style, IN REAL emSize, IN const RectF &layoutRect, IN const StringFormat *format ) Adiciona a estrutura de tópicos de uma cadeia de caracteres a este caminho.
GpStatus WINGDIPAPI GdipAddPathStringI(GpPath *path, GDIPCONST WCHAR *string, INT length, GDIPCONST GpFontFamily *family, INT style, REAL emSize, GDIPCONST Rect *layoutRect, GDIPCONST GpStringFormat *format)
Status GraphicsPath::AddString( IN const WCHAR *string, IN INT length, IN const FontFamily *family, IN INT style, IN REAL emSize, IN const Rect &layoutRect, IN const StringFormat *format ) Adiciona a estrutura de tópicos de uma cadeia de caracteres a este caminho.
GpStatus WINGDIPAPI GdipAddPathLineI(GpPath *path, INT x1, INT y1, INT x2, INT y2)
Status GraphicsPath::AddLine(IN INT x1, IN INT y1, IN INT x2, IN INT y2) Adiciona uma linha à figura atual deste caminho.
GpStatus WINGDIPAPI GdipAddPathLine2I(GpPath *path, GDIPCONST GpPoint *points, INT count)
Status GraphicsPath::AddLines(IN const Point* points, IN INT count) Adiciona uma sequência de linhas conectadas à figura atual deste caminho.
GpStatus WINGDIPAPI GdipAddPathArcI(GpPath *path, INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
Status GraphicsPath::AddArc(IN INT x, IN INT y, IN INT width, IN INT height, IN REAL startAngle, IN REAL sweepAngle) Adiciona um arco elíptico à figura atual deste caminho.
GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2, INT y2, INT x3, INT y3, INT x4, INT y4)
Status GraphicsPath::AddBezier(IN INT x1, IN INT y1, IN INT x2, IN INT y2, IN INT x3, IN INT y3, IN INT x4, IN INT y4) Adiciona um spline de Bézier à figura atual deste caminho.
GpStatus WINGDIPAPI GdipAddPathBeziersI(GpPath *path, GDIPCONST GpPoint *points, INT count)
Status GraphicsPath::AddBeziers(IN const Point* points, IN INT count) Adiciona um spline de Bézier à figura atual deste caminho.
GpStatus WINGDIPAPI GdipAddPathCurveI(GpPath *path, GDIPCONST GpPoint *points, INT count)
Status GraphicsPath::AddCurve(IN const Point* points, IN INT count) Adiciona um spline cardinal à figura atual deste caminho.
GpStatus WINGDIPAPI GdipAddPathCurve2I(GpPath *path, GDIPCONST GpPoint *points, INT count, REAL tension)
Status GraphicsPath::AddCurve(IN const Point* points, IN INT count, IN REAL tension) Adiciona um spline cardinal à figura atual deste caminho.
GpStatus WINGDIPAPI GdipAddPathCurve3I(GpPath *path, GDIPCONST GpPoint *points, INT count, INT offset, INT numberOfSegments, REAL tension)
Status GraphicsPath::AddCurve(IN const Point* points, IN INT count, IN INT offset, IN INT numberOfSegments, IN REAL tension) Adiciona um spline cardinal à figura atual deste caminho.
GpStatus WINGDIPAPI GdipAddPathClosedCurveI(GpPath *path, GDIPCONST GpPoint *points, INT count)
Status GraphicsPath::AddClosedCurve(IN const Point* points, IN INT count) Adiciona um spline cardinal fechado a este caminho.
GpStatus WINGDIPAPI GdipAddPathClosedCurve2I(GpPath *path, GDIPCONST GpPoint *points, INT count, REAL tension)
Status GraphicsPath::AddClosedCurve(IN const Point* points, IN INT count, IN REAL tension) Adiciona um spline cardinal fechado a este caminho.
GpStatus WINGDIPAPI GdipAddPathRectangleI(GpPath *path, INT x, INT y, INT width, INT height)
Status GraphicsPath::AddRectangle(IN const Rect& rect) Adiciona um retângulo a esse caminho.
Os parâmetros x, y, largura e altura na função flat especificam um retângulo que corresponde ao parâmetro rect no método wrapper.
GpStatus WINGDIPAPI GdipAddPathRectanglesI(GpPath *path, GDIPCONST GpRect *rects, INT count)
Status GraphicsPath::AddRectangles(IN const Rect* rects, INT count) Adiciona uma sequência de retângulos a este caminho
GpStatus WINGDIPAPI GdipAddPathEllipseI(GpPath *path, INT x, INT y, INT width, INT height)
Status GraphicsPath::AddEllipse(IN INT x, IN INT y, IN INT width, IN INT height) Adiciona uma ellipse a este caminho.
GpStatus WINGDIPAPI GdipAddPathPieI(GpPath *path, INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
Status GraphicsPath::AddPie(IN INT x, IN INT y, IN INT width, IN INT height, IN REAL startAngle, IN REAL sweepAngle) Adiciona uma pizza a este caminho. Um arco é uma parte de uma elipse, e uma pizza é uma parte da área delimitada por uma elipse. Uma pizza é delimitada por um arco e duas linhas (bordas) que vão do centro da elipse para os pontos de extremidade do arco.
GpStatus WINGDIPAPI GdipAddPathPolygonI(GpPath *path, GDIPCONST GpPoint *points, INT count)
Status GraphicsPath::AddPolygon(IN const Point* points, IN INT count) Adiciona um polígono a esse caminho.
GpStatus WINGDIPAPI GdipFlattenPath(GpPath *path, GpMatrix* matrix, REAL flatness)
Status GraphicsPath::Flatten(IN const Matrix* matrix = NULL, IN REAL flatness = FlatnessDefault) Aplica uma transformação a este caminho e converte cada curva no caminho em uma sequência de linhas conectadas.
GpStatus WINGDIPAPI GdipWindingModeOutline( GpPath *path, GpMatrix *matrix, REAL flatness )
Status GraphicsPath::Outline( IN const Matrix *matrix = NULL, IN REAL flatness = FlatnessDefault ) Transforma e nivela este caminho e converte os pontos de dados desse caminho para que representem apenas a estrutura de tópicos do caminho.
GpStatus WINGDIPAPI GdipWidenPath( GpPath *nativePath, GpPen *pen, GpMatrix *matrix, REAL flatness )
Status GraphicsPath::Widen( IN const Pen* pen, IN const Matrix* matrix = NULL, IN REAL flatness = FlatnessDefault ) Substitui este caminho por curvas que incluem a área preenchida quando esse caminho é desenhado por uma caneta especificada. Este método também nivela o caminho.
GpStatus WINGDIPAPI GdipWarpPath(GpPath *path, GpMatrix* matrix, GDIPCONST GpPointF *points, INT count, REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, WarpMode warpMode, REAL flatness)
Status GraphicsPath::Warp(IN const PointF* destPoints, IN INT count, IN const RectF& srcRect, IN const Matrix* matrix = NULL, IN WarpMode warpMode = WarpModePerspective, IN REAL flatness = FlatnessDefault) Aplica uma transformação warp a este caminho. Este método também nivela (converte em uma sequência de linhas retas) o caminho.
Os parâmetros srcx, srcy, srcwidth e srcheight na função simples especificam um retângulo que corresponde ao parâmetro srcRect no método wrapper.
GpStatus WINGDIPAPI GdipTransformPath(GpPath* path, GpMatrix* matrix)
Status GraphicsPath::Transform(IN const Matrix* matrix) Multiplica cada um dos pontos de dados deste caminho por uma matriz especificada.
GpStatus WINGDIPAPI GdipGetPathWorldBounds(GpPath* path, GpRectF* bounds, GDIPCONST GpMatrix *matrix, GDIPCONST GpPen *pen)
Status GraphicsPath::GetBounds(OUT RectF* bounds, IN const Matrix* matrix, IN const Pen* pen) const Obtém um retângulo delimitador para este caminho.
GpStatus WINGDIPAPI GdipGetPathWorldBoundsI(GpPath* path, GpRect* bounds, GDIPCONST GpMatrix *matrix, GDIPCONST GpPen *pen)
Status GraphicsPath::GetBounds(OUT Rect* bounds, IN const Matrix* matrix, IN const Pen* pen) const Obtém um retângulo delimitador para este caminho.
GpStatus WINGDIPAPI GdipIsVisiblePathPoint(GpPath* path, REAL x, REAL y, GpGraphics *graphics, BOOL *result)
BOOL GraphicsPath::IsVisible(IN REAL x, IN REAL y, IN const Graphics* g) const Determina se um ponto especificado está na área preenchida quando este caminho é preenchido por um objeto Graphics especificado.
GpStatus WINGDIPAPI GdipIsVisiblePathPointI(GpPath* path, INT x, INT y, GpGraphics *graphics, BOOL *result)
BOOL GraphicsPath::IsVisible(IN INT x, IN INT y, IN const Graphics* g) const Determina se um ponto especificado está na área preenchida quando este caminho é preenchido por um objeto Graphics especificado.
GpStatus WINGDIPAPI GdipIsOutlineVisiblePathPoint(GpPath* path, REAL x, REAL y, GpPen *pen, GpGraphics *graphics, BOOL *result)
BOOL GraphicsPath::IsOutlineVisible(IN REAL x, IN REAL y, IN const Pen* pen, IN const Graphics* g) const Determina se um ponto especificado toca a estrutura de tópicos deste caminho quando o caminho é desenhado por um objeto Graphics especificado e uma caneta especificada.
GpStatus WINGDIPAPI GdipIsOutlineVisiblePathPointI(GpPath* path, INT x, INT y, GpPen *pen, GpGraphics *graphics, BOOL *result)
BOOL GraphicsPath::IsOutlineVisible(IN INT x, IN INT y, IN const Pen* pen, IN const Graphics* g) const Determina se um ponto especificado toca a estrutura de tópicos deste caminho quando o caminho é desenhado por um objeto Graphics especificado e uma caneta especificada.