From: Michael C. <win...@gm...> - 2017-08-21 11:07:53
|
I 'm trying, but I do get some weird results. I 'm trying to debug based on the DLLs, not the Guido source. When I pass my own Direct2D (incomplete) implementation, I get some calls to MoveTo() and SetLineWidth() with weird float values. Perhaps anyone can share with me a "correct" draw code (that would simply draw a guido string to a HDC) so I am sure that I am calling the library correctly. Currently I 'm doing this (error checking removed): --------------------------------- GSystemWin32 sys(hDC, hDC); auto ddev = sys.CreateDisplayDevice(); auto& dev = *ddev; GuidoInitDesc gd = { &dev, 0, "guido2", "Calibri" }; GuidoOnDrawDesc desc; GuidoInit(&gd); GuidoPageFormat fmt = { 0 }; GuidoGetDefaultPageFormat(&fmt); fmt.width = 2080; fmt.height = 1600; ARHandler arh; GuidoParseString(gstr, &arh); GuidoAR2GR(arh, 0, &desc.handle); GuidoResizePageToMusic(desc.handle); GuidoGetPageFormat(desc.handle, 1, &fmt); desc.hdc = &dev; desc.page = 1; desc.updateRegion.erase = true; desc.scrollx = desc.scrolly = 0; desc.sizex = (int)fmt.width; desc.sizey = (int)fmt.height; GuidoResizePageToMusic(desc.handle); desc.scrollx = desc.scrolly = 0; GuidoErrCode ec = GuidoOnDraw(&desc); GuidoResizePageToMusic(desc.handle); ------------------------------- This works fine with GSystemWin32sys. 2017-08-21 11:58 GMT+03:00 Dominique Fober <fo...@gr...>: > Hi Michael, > > The GDI an GDIPlus devices are quite old. I didn’t checked how it works on > the latest Windows OS. > In addition, there is no application to test on the repository. I suggest > to test with a minimal application in order to find what’s going wrong. > Regarding Direct2D, I’m not aware of any implementation. It should not be > difficult to build one, you have only to implement the VGDevice, VGSystem > and VGFont interfaces. > — > Dominique > > > Le 12 août 2017 à 21:39, Michael Chourdakis <win...@gm...> a > écrit : > > I 've trouble with GDI+. > > GSystemWin32 sys(hDC, hDC); > DeviceWin32 dev(hDC, &sys); > This works. > > GSystemWin32GDIPlus sys(hDC,hDC); > GDeviceWin32GDIPlus dev(hDC,&sys); > > This succeeds, but I get an empty white bitmap. > > Am I missing some extra initialization for GDI+? > Also, I 'm willing to make a Direct2D implementation, anyone already > working on it? > > Thanks. > > > > > 2017-07-25 15:57 GMT+03:00 Dominique Fober <fo...@gr...>: > >> Hi all, >> >> The last commit to the ‘dev’ branch brings a significant change to the >> guido engine. >> Internal operations have been revised in a more functional approach, >> which is transparent for end users. >> It comes also with a syntax change for ornaments (\trill \turn \mordent) >> that requires existing gmn code to be updated. >> The reason of this breach of compatibility is quite simple: the previous >> syntax was making use of a chord to specify the non-notated note part of >> the ornament (e.g. \trill{g, f#} to indicate a trill on ‘g’ using ‘f#’ as >> second note), which was preventing chords ornaments. >> With the new design, ornaments work like other tags and the alternate >> note is specified as a parameter (e.g. \trill<“f#’>(g) ). >> >> By the way and since compatibility was broken, inverted dy for dynamics >> (\cresc, \decresc) has also been fixed and works now similarly to all the >> other tags. Again, existing scripts with dynamics and dy attributes have to >> be updated. >> >> These are the major changes. See the change log for all details and let >> me know if these changes pose problems to you. >> All the best, >> — >> Dominique >> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Guidolib-devel mailing list >> Gui...@li... >> https://lists.sourceforge.net/lists/listinfo/guidolib-devel >> > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot______ > _________________________________________ > Guidolib-devel mailing list > Gui...@li... > https://lists.sourceforge.net/lists/listinfo/guidolib-devel > > > |