From: Michael C. <win...@gm...> - 2015-03-01 19:02:41
|
Hello again. I compiled guido for iOS. Note that, in the resulting Xcode Project, the "arm64" must also be included, otherwise the library is not usable in newer projects. Now I 'm trying to draw a sample score to a CGContextRef, using the following code. All the functions succeed, but nothing is shown. I'm not sure if it loads the guido2 font, but in any case the text is not displayed as well. I 'm calling this from drawRect: from an UIScrollView: void g(CGContextRef d1,int wi,int he) { GSystemOSX sys(d1, d1); GDeviceOSX dev(wi,he,&sys); GuidoInitDesc gd = { &dev, 0, "guido2", "Optima" }; // Is this correct ? I 've included guido2.ttf in the project and in plist GuidoOnDrawDesc desc; GuidoInit (&gd); ARHandler arh = 0; const char* a1 = "{ [ \\meter<\"4/4\"> \\tempo<\"This is a sample line\"> c ] }"; GuidoParseString(a1, &arh); GuidoLayoutSettings gls = {0}; GuidoGetDefaultLayoutSettings(&gls); GuidoAR2GR (arh, &gls, &desc.handle); desc.hdc = &dev; // we'll draw on the postscript device desc.page = 1; // page to draw desc.updateRegion.erase = true; // and draw everything desc.scrollx = desc.scrolly = 0; // from the upper left page corner desc.sizex = wi; desc.sizey = he; // size of the drawing region // desc.isprint = true; GuidoOnDraw (&desc); GuidoFreeGR(desc.handle); GuidoFreeAR(arh); GuidoShutdown(); } Best Regards. 2015-02-28 18:07 GMT+02:00 Michael Chourdakis <win...@gm...>: > Hello there. > > I 've been using the library in Windows and I 'm very happy with it. Now I > 'm trying to use it in an iOS Project. I 've used cmake to build the > library for iOS and I get a .framework folder which I drag to Xcode. > > However this library seems to be missing some core stuff, includes etc. > Not everything is included. > > Anyone has tried it for iOS yet? Must I include manually something? > > Best Regards. > > > |