本文整理汇总了C#中OpenNETCF.GDIPlus.GpPointF类的典型用法代码示例。如果您正苦于以下问题:C# GpPointF类的具体用法?C# GpPointF怎么用?C# GpPointF使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GpPointF类属于OpenNETCF.GDIPlus命名空间,在下文中一共展示了GpPointF类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Matrix
Matrix( GpRectF rect,
GpPointF[] dstplg)
{
GpMatrix matrix;
lastResult = NativeMethods.GdipCreateMatrix3(rect,
dstplg,
out matrix);
SetNativeMatrix(matrix);
}
示例2: GdipFillPolygon2
GdipFillPolygon2(GpGraphics graphics, GpBrush brush,
GpPointF[] points, int count);
示例3: GdipAddPathCurve3
GdipAddPathCurve3(GpPath path, GpPointF[] points, int count,
int offset, int numberOfSegments, float tension);
示例4: GdipAddPathCurve
GdipAddPathCurve(GpPath path, GpPointF[] points, int count);
示例5: GdipAddPathLine2
GdipAddPathLine2(GpPath path, GpPointF[] points, int count);
示例6: GdipGetPathPoints
GdipGetPathPoints(GpPath path, GpPointF[] points, int count);
示例7: GdipAddPathPolygon
GdipAddPathPolygon(GpPath path, GpPointF[] points, int count);
示例8: DrawImage
public GpStatus DrawImage(ImagePlus image,
GpPointF[] destPoints)
{
int count = destPoints.Length;
if (count != 3 && count != 4)
return SetStatus(GpStatus.InvalidParameter);
return SetStatus(NativeMethods.GdipDrawImagePoints(nativeGraphics,
image != null ? image.nativeImage
: new GpImage(),
destPoints, count));
}
示例9: FillClosedCurve
public GpStatus FillClosedCurve(BrushPlus brush,
GpPointF[] points)
{
return SetStatus(NativeMethods.GdipFillClosedCurve(nativeGraphics,
brush.nativeBrush,
points, points.Length));
}
示例10: DrawLine
public GpStatus DrawLine(PenPlus pen,
GpPointF pt1,
GpPointF pt2)
{
return DrawLine(pen, pt1.X, pt1.Y, pt2.X, pt2.Y);
}
示例11: FindPieSliceUnderPoint
/// <summary>
/// Searches the chart to find the index of the pie slice which
/// contains point given. Search order goes in the direction opposite
/// to drawing order.
/// </summary>
/// <param name="point">
/// <c>PointF</c> point for which pie slice is searched for.
/// </param>
/// <returns>
/// Index of the corresponding pie slice, or -1 if none is found.
/// </returns>
public int FindPieSliceUnderPoint(GpPointF point)
{
// first check tops
for (int i = 0; i < m_pieSlices.Length; ++i)
{
PieSlice slice = (PieSlice)m_pieSlices[i];
if (slice.PieSliceContainsPoint(point))
return (int)m_pieSlicesMapping[i];
}
// split the backmost (at 270 degrees) pie slice
ArrayList pieSlicesList = new ArrayList(m_pieSlices);
PieSlice[] splitSlices = m_pieSlices[0].Split(270F);
if (splitSlices.Length > 1)
{
pieSlicesList[0] = splitSlices[1];
if (splitSlices[0].SweepAngle > 0F)
{
pieSlicesList.Add(splitSlices[0]);
}
}
PieSlice[] pieSlices = (PieSlice[])pieSlicesList.ToArray(typeof(PieSlice));
int indexFound = -1;
// if not found yet, then check for periferies
int incrementIndex = 0;
int decrementIndex = pieSlices.Length - 1;
while (incrementIndex <= decrementIndex)
{
PieSlice sliceLeft = pieSlices[decrementIndex];
float angle1 = 270 - sliceLeft.StartAngle;
PieSlice sliceRight = pieSlices[incrementIndex];
float angle2 = (sliceRight.EndAngle + 90) % 360;
Debug.Assert(angle2 >= 0);
if (angle2 < angle1)
{
if (sliceRight.PeripheryContainsPoint(point))
indexFound = incrementIndex;
++incrementIndex;
}
else
{
if (sliceLeft.PeripheryContainsPoint(point))
indexFound = decrementIndex;
--decrementIndex;
}
}
// check for start/stop sides, starting from the foremost
if (indexFound < 0)
{
int foremostPieIndex = GetForemostPieSlice(pieSlices);
// check for start sides from the foremost slice to the left
// side
int i = foremostPieIndex;
while (i < pieSlices.Length)
{
PieSlice sliceLeft = (PieSlice)pieSlices[i];
if (sliceLeft.StartSideContainsPoint(point))
{
indexFound = i;
break;
}
++i;
}
// if not found yet, check end sides from the foremost to the right
// side
if (indexFound < 0)
{
i = foremostPieIndex;
while (i >= 0)
{
PieSlice sliceLeft = (PieSlice)pieSlices[i];
if (sliceLeft.EndSideContainsPoint(point))
{
indexFound = i;
break;
}
--i;
}
}
}
// finally search for bottom sides
if (indexFound < 0)
{
for (int i = 0; i < m_pieSlices.Length; ++i)
{
PieSlice slice = (PieSlice)m_pieSlices[i];
if (slice.BottomSurfaceSectionContainsPoint(point))
return (int)m_pieSlicesMapping[i];
}
}
//.........这里部分代码省略.........
示例12: GdipCreateMatrix3
GdipCreateMatrix3(GpRectF rect, GpPointF[] dstplg,
out GpMatrix matrix);
示例13: GdipDrawBeziers
GdipDrawBeziers(GpGraphics graphics, GpPen pen, GpPointF[] points,
int count);
示例14: GdipFillClosedCurve2
GdipFillClosedCurve2(GpGraphics graphics, GpBrush brush,
GpPointF[] points, int count,
float tension, FillMode fillMode);
示例15: GdipFillClosedCurve
GdipFillClosedCurve(GpGraphics graphics, GpBrush brush,
GpPointF[] points, int count);