1

XPS ドキュメント API で円を描くにはどうすればよいですか?

次のコードを使用します。円の始点と終点が同じ場合、円はまったく描画されません。「代わりに角度ゼロの円弧」を描画します..

XPS_POINT startPoint = { 500, 500};

hr = xpsFactory->CreateGeometryFigure(&startPoint, &figure);
XPS_SEGMENT_TYPE segmentTypes[1] = {
    XPS_SEGMENT_TYPE_ARC_LARGE_COUNTERCLOCKWISE
};


//  x - coordinate of the arc's end point.
//  y - coordinate of the arc's end point.
//  Length of the ellipse's radius along the x-axis.
//  Length of the ellipse's radius along the y-axis.
//  Rotation angle.
FLOAT segmentData[5] = {
     startPoint.x, // if it is startPoint.x + 0.001, I see kind pf a circle
     startPoint.y,
    radius,
    radius,
    360
};

BOOL segmentStrokes[1] = {
    TRUE// Yes, draw each of the segment arcs.
};

// Add the segment data to the figure.
hr = figure->SetSegments(
    1,
    5,
    segmentTypes,
    segmentData,
    segmentStrokes);

hr = figure->SetIsClosed(TRUE);
hr = figure->SetIsFilled(TRUE);
4

0 に答える 0