Tag: polygon

GPC多边形初始化

我正在使用GPC Polygon Clipping lib并希望以编程方式创建多边形。 我只看到如何从文件创建一个代码。 如何在代码中进行初始化?

在Objective-C中使用C函数(适用于iPhone)

‘好吧。 我是一个自我描述的iPhone编程招执的人(拥有更长的perl和网络背景 – 30年)……但上周冒了一大笔钱买了几本好书。 在填写并阅读了超过1000页之后 – 并且非常了解它,我正在前往一个良好的第一个原生iPhone应用程序。 我的问题是:我不知道如何在Objective-C中做一个简单的Geographic(lat / long)多边形点例程。 我有两种方法可以做到这一点。 一个在C(第一个代码示例)和一个在JavaScript(第二个代码示例): // this is the poly.h file int pnpoly(int nvert, float *vertx, float *verty, float testx, float testy); // this is the poly.c file #include “poly.h” int pnpoly(int nvert, float *vertx, float *verty, float testx, float testy){ int i, j, c = 0; for […]