canvasdraw-users Mailing List for CD
Brought to you by:
scuri
You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(12) |
Nov
(1) |
Dec
|
2012 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(7) |
Oct
|
Nov
(7) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(13) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(7) |
2020 |
Jan
(12) |
Feb
(3) |
Mar
(11) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <rob...@qq...> - 2025-06-19 02:21:57
|
Hi, I use lua, Iup, could use iup.plot, iup.glcanvas. I think GL is available here. But failed to use GL in CD canvas. Environment: - lua 5.3.4. - CD 5.14. - Windows 10 x64. - Intel Core 7th-i5 Graphics 620, + AMD Radeon Graphics. Use iup.glcanvas to check version. ```lua local iup=require'iuplua' require"iupluagl" local GL_Canvas=iup.glcanvas{ map_cb=function() print("GL_Canvas.map_cb") end } local Dialog=iup.dialog{ RASTERSIZE=nil, GL_Canvas, } Dialog:show() --after map print("GL_VERSION="..iup.GetGlobal("GL_VERSION"), "GL_VENDOR="..iup.GetGlobal("GL_VENDOR"), "GL_RENDERER="..iup.GetGlobal("GL_RENDERER")) -- 4.6.0 - Build 27.20.100.9664 Intel Intel(R) HD Graphics 620 assert(iup.GLIsCurrent(GL_Canvas)) assert(not GL_Canvas.LASTERROR and not GL_Canvas.ERROR) ``` Failed when use CD ```lua local CD=require'cdlua' require"cdluagl" --print(CD.ContextCaps(CD.GL)) local CD_GL_Canvas=CD.CreateCanvas(CD.GL,'400x300') assert(CD.Activate(CD_GL_Canvas)==CD.OK) assert(CD_GL_Canvas:GetAttribute('GLVERSION'),"GL is not available") ``` |
From: Antonio S. <ant...@gm...> - 2021-03-24 12:58:53
|
Hi, Most of my answers regarding BC6 will be I don't know. I haven't built IUP/CD libraries for BC6 for a long time now. I don't even have it on my system installed anymore. When we built CD for BC6, I recall that compiling code that uses GDI+ was a problem. Probably that's why you couldn't find a cdcontextplus.lib file on the distribution. Notice that IUP and CD evolved a lot since the version you are using... > I've done all that actions according to several ways described in manuals to build from source. I apologize, maybe I should read the manual more carefully before asking a question, but at glance, I didn't get what I've done wrong. Sorry, our build system is not very flexible in Windows. We are moving to CMake, but I didn't have time to complete the move yet. > Next, I've created BC6 static library project and added files from cd/src/cdcontextplus.mak: That's a good approach. > get a segfault. Aff We may try a different approach, to remove the GdiPlus dependency from iup_plot. I can't remember if the version you are using has this feature, but GdiPlus can be removed by not defining USE_CONTEXTPLUS in the config.mak file of the iup/srcplot folder. Best, Scuri Em qua., 24 de mar. de 2021 às 09:36, Сергей Мосолов <mos...@gm...> escreveu: > Hello, Dear IUP library developers! > > I'm looking for a way to incorporate IUP, and especially the iup_plot > library as a static library, embedded in Borland C++ Builder 6(BC6). app. > > The first thing I've done is download binary releases from sourceforge.net > : > lua-5.1.5_Win32_bc6_lib > iup-3.14_Win32_bc6_lib.zip > cd-5.8.2_Win32_bc6_lib.zip > > And make a test project, that linked to: > cd.lib > cdgl.lib > cdlua51.lib > freetype6.lib > ftgl.lib > iup.lib > iup_plot.lib > iupcd.lib > iupgl.lib > iuplua_plot51.lib > iuplua51.lib > lua5.1.lib > zlib1.lib > > However, the build fails due to iup_plot.lib external symbol > cdInitContextPlus. > > Skimming through cd libs sources led me to belief that cdInitContextPlus > must be in cdcontextplus.lib (folder cd\src\gdiplus) for Win32. > I couldn't find that library prebuilt for BC6 in binary releases from > sourceforge.net > > I've tried to build library from sources, to do so I've accomplished > several actions: > 1. download tecmake, extract to C:\tecgraf\tecmake, > added C:\tecgraf\tecmake to PATH env.var., tested that tecmake.bat is in > sys path > 2. changed tecmake.bat > ``` > set TECMAKE_PATH=c:\\tecgraf\\tecmake > set TECMAKE_MAKE=gmake > ``` > set env vars: > ``` > BC6=C:/Borland/CBuilder6 > TEC_UNAME=bc6 > ``` > 3. installed gnuwin32 (https://sourceforge.net/projects/gnuwin32) > 4. rename make.exe to gmake.exe, add gmake.exe path to sys path > 5. download cd-5.8.2_Sources, extracted to C:\tecgraf > 6. run cmd and: > ``` > Microsoft Windows [Version 6.1.7601] > (c) Корпорация Майкрософт (Microsoft Corp.), 2009. Все права защищены. > > C:\Users\dev>cd ../.. > > C:\>cd tecgraf/cd > > C:\tecgraf\cd>gmake > zlib1.wdep:1: *** Missing delimiter. Abort. > gmake[1]: *** [cd_zlib] Error 2 > gmake: *** [do_all] Error 2 > > C:\tecgraf\cd>gmake --version > GNU Make 3.81 > Copyright (C) 2006 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. > There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A > PARTICULAR PURPOSE. > > This program built for i386-pc-mingw32 > > C:\tecgraf\cd>tecmake.bat > c:\\tecgraf\\tecmake\tecmakewin.mak:138: config.mak: No such file or > directory > c:\\tecgraf\\tecmake\tecmakewin.mak:1835: .wdep: No such file or directory > gmake: *** Нет правила для сборки цели `config.mak', требуемой для > `.wdep'. Ост > анов. > > C:\tecgraf\cd>cd src > > C:\tecgraf\cd\src>gmake > zlib1.wdep:1: *** Missing delimiter. Abort. > gmake: *** [cd_zlib] Error 2 > > C:\tecgraf\cd\src>tecmake.bat > c:\\tecgraf\\tecmake\tecmakewin.mak:1835: cd.wdep: No such file or > directory > gmake: *** [cd.wdep] Ошибка 255 > > C:\tecgraf\cd\src>gmake -f Makefile.tecmake > gmake: Makefile.tecmake: No such file or directory > gmake: *** No such target `Makefile.tecmake'. Abort. > > C:\tecgraf\cd\src>dir > 24.03.2021 11:14 <DIR> . > 24.03.2021 11:14 <DIR> .. > 24.03.2015 23:05 <DIR> cairo > 27.04.2015 22:40 21 348 cd.c > 31.07.2014 03:02 7 348 cd.def > 19.11.2014 01:01 625 cd.rc > 24.03.2021 11:14 5 cd.wdep > 31.07.2014 03:02 1 150 cdcairo.mak > 31.07.2014 03:02 649 cdcontextplus.mak > 31.07.2014 03:02 7 467 cdgdk.def > 31.07.2014 03:01 7 128 cdgdk3.def > 31.07.2014 03:02 22 cdgl.def > 31.07.2014 03:02 612 cdgl.mak > 31.07.2014 03:01 276 cdlua3.mak > 04.02.2015 00:35 429 cdlua5.mak > 04.02.2015 00:35 1 059 cdluacairo5.mak > 04.02.2015 00:35 750 cdluacontextplus5.mak > 31.07.2014 03:02 313 cdluagl3.mak > 04.02.2015 00:35 531 cdluagl5.mak > 04.02.2015 00:35 570 cdluaim5.mak > 31.07.2014 03:02 318 cdluapdf3.mak > 04.02.2015 00:34 535 cdluapdf5.mak > 31.07.2014 03:02 23 cdpdf.def > 31.07.2014 03:01 265 cdpdf.mak > 31.07.2014 03:02 25 059 cd_active.c > 31.07.2014 03:02 24 491 cd_attributes.c > 31.07.2014 03:02 5 979 cd_bitmap.c > 31.07.2014 03:02 1 541 cd_freetype.mak > 13.08.2014 01:34 1 808 cd_ftgl.mak > 31.07.2014 03:02 10 879 cd_image.c > 31.07.2014 03:02 2 898 cd_pdflib.mak > 31.07.2014 03:01 19 372 cd_primitives.c > 24.03.2015 23:32 21 511 cd_text.c > 31.07.2014 03:02 19 426 cd_util.c > 31.07.2014 03:02 107 619 cd_vectortext.c > 31.07.2014 03:02 904 cd_zlib.mak > 30.04.2015 03:38 4 646 config.mak > 01.04.2015 00:04 <DIR> drv > 31.07.2014 03:02 <DIR> freetype2 > 31.07.2014 03:02 <DIR> ftgl > 25.08.2014 23:51 <DIR> gdiplus > 31.07.2014 03:02 <DIR> gdk > 31.07.2014 03:02 <DIR> haiku > 31.07.2014 03:01 <DIR> intcgm > 31.07.2014 03:02 <DIR> lua3 > 23.04.2015 17:30 <DIR> lua5 > 23.04.2015 20:50 1 719 Makefile > 28.04.2015 01:39 1 399 make_uname > 23.04.2015 20:49 1 600 make_uname.bat > 31.07.2014 03:02 <DIR> pdflib > 31.07.2014 03:02 30 808 rgb2map.c > 15.08.2014 21:47 <DIR> sim > 04.11.2014 17:23 <DIR> svg > 31.07.2014 03:01 17 364 wd.c > 31.07.2014 03:01 3 184 wdhdcpy.c > 18.03.2015 02:18 <DIR> win32 > 18.03.2015 02:19 <DIR> x11 > 31.07.2014 03:02 <DIR> xrender > 31.07.2014 03:02 <DIR> zlib > 24.03.2021 10:25 5 zlib1.wdep > ``` > > I've done all that actions according to several ways described in manuals > to build from source. I apologize, maybe I should read the manual more > carefully before asking a question, but at glance, I didn't get what I've > done wrong. > > Next, I've created BC6 static library project and added files from > cd/src/cdcontextplus.mak: > cdwclpp.cpp > cdwdbufp.cpp > cdwemfp.cpp > cdwgdiplus.c > cdwimgp.cpp > cdwinp.cpp > cdwnativep.cpp > cdwprnp.cpp > define macro defines WIN32 and CD_NO_OLD_INTERFACE > > copy bunch of includes from cd sources, define my own min and max through > preprocessor macro in order to make it compile > ^^^ > !!! that may be very stupid as of I don't know which other macro defines > tecmake are defining during build from sources as library authors sees it. > > After that I was able to add compiled static lib (and gdiplus.lib produced > by implib (BC6 util) from my system gdiplus.dll) to test project but and, > at last, get a segfault. > gdiplus.dll located > at c:\windows\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17514_none_72d18a4386696c80\GDIPLUS.DLL > I believe there is a gdiplus.dll version encoded in that path above. > > Segfault will not happen if I didn't call luaopen_iuplua_plot (e.g. > comment out line 83 "luaL_requiref(L, "iuplua", luaopen_iuplua_plot, 0);") > so libs related to plot wouldn't be statically linked. > Segfault happens during startup, looks like the reason is a startup > initialization of some global variable. > > I'm definitely doing something wrong. > > Is there any way to get precompiled cdcontextplus.lib for BC6, could you > kindly point to what I've done wrong with building from source, maybe a > manual paragraph that describes what I've must do to achieve build from > source? > > Is it possible for bc6 to use iup_plot? > Can last libs versions (iup 3.30) be compiled with BC6 as stated in manual? > > Is it possible to get an archive from build system for BC6 or some > examples of building IUP from sources? I would be glad to get any advice > (even that I shouldn't use BC6 in 2021). > > I've uploaded two described BC6 projects just in case: > https://disk.yandex.ru/d/ElfVaII7k09GgA > https://disk.yandex.ru/d/-bVaKZZJlXOgTA > > Best regards, Sergey > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > |
From: Сергей М. <mos...@gm...> - 2021-03-24 07:48:07
|
Hello, Dear IUP library developers! I'm looking for a way to incorporate IUP, and especially the iup_plot library as a static library, embedded in Borland C++ Builder 6(BC6). app. The first thing I've done is download binary releases from sourceforge.net: lua-5.1.5_Win32_bc6_lib iup-3.14_Win32_bc6_lib.zip cd-5.8.2_Win32_bc6_lib.zip And make a test project, that linked to: cd.lib cdgl.lib cdlua51.lib freetype6.lib ftgl.lib iup.lib iup_plot.lib iupcd.lib iupgl.lib iuplua_plot51.lib iuplua51.lib lua5.1.lib zlib1.lib However, the build fails due to iup_plot.lib external symbol cdInitContextPlus. Skimming through cd libs sources led me to belief that cdInitContextPlus must be in cdcontextplus.lib (folder cd\src\gdiplus) for Win32. I couldn't find that library prebuilt for BC6 in binary releases from sourceforge.net I've tried to build library from sources, to do so I've accomplished several actions: 1. download tecmake, extract to C:\tecgraf\tecmake, added C:\tecgraf\tecmake to PATH env.var., tested that tecmake.bat is in sys path 2. changed tecmake.bat ``` set TECMAKE_PATH=c:\\tecgraf\\tecmake set TECMAKE_MAKE=gmake ``` set env vars: ``` BC6=C:/Borland/CBuilder6 TEC_UNAME=bc6 ``` 3. installed gnuwin32 (https://sourceforge.net/projects/gnuwin32) 4. rename make.exe to gmake.exe, add gmake.exe path to sys path 5. download cd-5.8.2_Sources, extracted to C:\tecgraf 6. run cmd and: ``` Microsoft Windows [Version 6.1.7601] (c) Корпорация Майкрософт (Microsoft Corp.), 2009. Все права защищены. C:\Users\dev>cd ../.. C:\>cd tecgraf/cd C:\tecgraf\cd>gmake zlib1.wdep:1: *** Missing delimiter. Abort. gmake[1]: *** [cd_zlib] Error 2 gmake: *** [do_all] Error 2 C:\tecgraf\cd>gmake --version GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for i386-pc-mingw32 C:\tecgraf\cd>tecmake.bat c:\\tecgraf\\tecmake\tecmakewin.mak:138: config.mak: No such file or directory c:\\tecgraf\\tecmake\tecmakewin.mak:1835: .wdep: No such file or directory gmake: *** Нет правила для сборки цели `config.mak', требуемой для `.wdep'. Ост анов. C:\tecgraf\cd>cd src C:\tecgraf\cd\src>gmake zlib1.wdep:1: *** Missing delimiter. Abort. gmake: *** [cd_zlib] Error 2 C:\tecgraf\cd\src>tecmake.bat c:\\tecgraf\\tecmake\tecmakewin.mak:1835: cd.wdep: No such file or directory gmake: *** [cd.wdep] Ошибка 255 C:\tecgraf\cd\src>gmake -f Makefile.tecmake gmake: Makefile.tecmake: No such file or directory gmake: *** No such target `Makefile.tecmake'. Abort. C:\tecgraf\cd\src>dir 24.03.2021 11:14 <DIR> . 24.03.2021 11:14 <DIR> .. 24.03.2015 23:05 <DIR> cairo 27.04.2015 22:40 21 348 cd.c 31.07.2014 03:02 7 348 cd.def 19.11.2014 01:01 625 cd.rc 24.03.2021 11:14 5 cd.wdep 31.07.2014 03:02 1 150 cdcairo.mak 31.07.2014 03:02 649 cdcontextplus.mak 31.07.2014 03:02 7 467 cdgdk.def 31.07.2014 03:01 7 128 cdgdk3.def 31.07.2014 03:02 22 cdgl.def 31.07.2014 03:02 612 cdgl.mak 31.07.2014 03:01 276 cdlua3.mak 04.02.2015 00:35 429 cdlua5.mak 04.02.2015 00:35 1 059 cdluacairo5.mak 04.02.2015 00:35 750 cdluacontextplus5.mak 31.07.2014 03:02 313 cdluagl3.mak 04.02.2015 00:35 531 cdluagl5.mak 04.02.2015 00:35 570 cdluaim5.mak 31.07.2014 03:02 318 cdluapdf3.mak 04.02.2015 00:34 535 cdluapdf5.mak 31.07.2014 03:02 23 cdpdf.def 31.07.2014 03:01 265 cdpdf.mak 31.07.2014 03:02 25 059 cd_active.c 31.07.2014 03:02 24 491 cd_attributes.c 31.07.2014 03:02 5 979 cd_bitmap.c 31.07.2014 03:02 1 541 cd_freetype.mak 13.08.2014 01:34 1 808 cd_ftgl.mak 31.07.2014 03:02 10 879 cd_image.c 31.07.2014 03:02 2 898 cd_pdflib.mak 31.07.2014 03:01 19 372 cd_primitives.c 24.03.2015 23:32 21 511 cd_text.c 31.07.2014 03:02 19 426 cd_util.c 31.07.2014 03:02 107 619 cd_vectortext.c 31.07.2014 03:02 904 cd_zlib.mak 30.04.2015 03:38 4 646 config.mak 01.04.2015 00:04 <DIR> drv 31.07.2014 03:02 <DIR> freetype2 31.07.2014 03:02 <DIR> ftgl 25.08.2014 23:51 <DIR> gdiplus 31.07.2014 03:02 <DIR> gdk 31.07.2014 03:02 <DIR> haiku 31.07.2014 03:01 <DIR> intcgm 31.07.2014 03:02 <DIR> lua3 23.04.2015 17:30 <DIR> lua5 23.04.2015 20:50 1 719 Makefile 28.04.2015 01:39 1 399 make_uname 23.04.2015 20:49 1 600 make_uname.bat 31.07.2014 03:02 <DIR> pdflib 31.07.2014 03:02 30 808 rgb2map.c 15.08.2014 21:47 <DIR> sim 04.11.2014 17:23 <DIR> svg 31.07.2014 03:01 17 364 wd.c 31.07.2014 03:01 3 184 wdhdcpy.c 18.03.2015 02:18 <DIR> win32 18.03.2015 02:19 <DIR> x11 31.07.2014 03:02 <DIR> xrender 31.07.2014 03:02 <DIR> zlib 24.03.2021 10:25 5 zlib1.wdep ``` I've done all that actions according to several ways described in manuals to build from source. I apologize, maybe I should read the manual more carefully before asking a question, but at glance, I didn't get what I've done wrong. Next, I've created BC6 static library project and added files from cd/src/cdcontextplus.mak: cdwclpp.cpp cdwdbufp.cpp cdwemfp.cpp cdwgdiplus.c cdwimgp.cpp cdwinp.cpp cdwnativep.cpp cdwprnp.cpp define macro defines WIN32 and CD_NO_OLD_INTERFACE copy bunch of includes from cd sources, define my own min and max through preprocessor macro in order to make it compile ^^^ !!! that may be very stupid as of I don't know which other macro defines tecmake are defining during build from sources as library authors sees it. After that I was able to add compiled static lib (and gdiplus.lib produced by implib (BC6 util) from my system gdiplus.dll) to test project but and, at last, get a segfault. gdiplus.dll located at c:\windows\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17514_none_72d18a4386696c80\GDIPLUS.DLL I believe there is a gdiplus.dll version encoded in that path above. Segfault will not happen if I didn't call luaopen_iuplua_plot (e.g. comment out line 83 "luaL_requiref(L, "iuplua", luaopen_iuplua_plot, 0);") so libs related to plot wouldn't be statically linked. Segfault happens during startup, looks like the reason is a startup initialization of some global variable. I'm definitely doing something wrong. Is there any way to get precompiled cdcontextplus.lib for BC6, could you kindly point to what I've done wrong with building from source, maybe a manual paragraph that describes what I've must do to achieve build from source? Is it possible for bc6 to use iup_plot? Can last libs versions (iup 3.30) be compiled with BC6 as stated in manual? Is it possible to get an archive from build system for BC6 or some examples of building IUP from sources? I would be glad to get any advice (even that I shouldn't use BC6 in 2021). I've uploaded two described BC6 projects just in case: https://disk.yandex.ru/d/ElfVaII7k09GgA https://disk.yandex.ru/d/-bVaKZZJlXOgTA Best regards, Sergey |
From: Antonio S. <ant...@gm...> - 2020-08-02 17:38:33
|
Hi All, The 5.14 version of the CD library has been released. This version is just to align with the new version of the IUP library, and with a few modifications. You can find the complete list of changes and files for download at: http://www.tecgraf.puc-rio.br/cd/ http://canvasdraw.sourceforge.net/ Best Regards, Antonio Scuri |
From: Antonio S. <ant...@gm...> - 2020-05-19 02:28:33
|
Hi All, The 5.13 version of the CD library has been released. This version implements support for UTF-8 in the SVG driver and has some bug fixes. You can find the complete list of changes and files for download at: http://www.tecgraf.puc-rio.br/cd/ http://canvasdraw.sourceforge.net/ Best Regards, Antonio Scuri |
From: Antonio S. <ant...@gm...> - 2020-03-25 12:48:20
|
Yes, but as I said, it depends on the application. Some applications define the size of the text and then the lines must align to it. If yours the text must align to the lines, then yes, you should use font sizes in pixels. To use font sizes in pixel you can specify negative values in cd.CanvasFont. To manually convert points to pixels you can use canvas:MM2Pixel(mm_dx, mm_dy) I tested this, on your sample and returns ok: print(cdbCanvas:MM2Pixel(12/cd.MM2PT, 12/cd.MM2PT )) 32.0 32.0 Best, Scuri Em ter., 24 de mar. de 2020 às 20:49, Milind Gupta <mil...@gm...> escreveu: > Yes this one does not have scaling because I was just doing an example to > check proportionality. > > So what I understand is to be consistent across different canvases where > pixels/mm are different I should internally store the size of text I > display in pixels? That way when I implement scaling it would be on pixels > and remain consistent. > > But when I tried to convert the pt size to pixels I am not having good > results. > > For example to convert 12 pts to pixels I did this: > > cd.MM2Pixel(12/cd.MM2PT, 12/cd.MM2PT ) > > But this returns 0. How do I translate this? > > On Tue, Mar 24, 2020 at 12:48 PM Antonio Scuri <ant...@gm...> > wrote: > >> Hi, >> >> That sample has no scaling. I least I couldn't find any. >> >> I run it and print it. Yes the text looks larger because it is using >> the default font which is specified in points, not in pixels. >> >> Best, >> Scuri >> >> >> Em ter., 24 de mar. de 2020 às 16:42, Milind Gupta < >> mil...@gm...> escreveu: >> >>> For example the screen shows the graphic as: >>> >>> [image: image.png] >>> >>> While the printout shows it like: >>> [image: image.png] >>> The text gets totally out of proportion to the rest of the drawing >>> compared to the screen for the same size. >>> >>> On Tue, Mar 24, 2020 at 12:38 PM Milind Gupta <mil...@gm...> >>> wrote: >>> >>>> Actually the problem is the scaling is not the same on the screen >>>> compared to the printer. So the issue is if I scale the drawing and the >>>> text proportionally to fir the number of pixels the text gets much more >>>> larger. >>>> To understand that if you just run the script and see how it >>>> looks on the screen compared to on the printer you can see that the scaling >>>> of the text and the graphics is not proportional. The text ends up much >>>> larger in printer than on the screen. >>>> >>>> On Tue, Mar 24, 2020 at 12:29 PM Antonio Scuri <ant...@gm...> >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> That's expected. The PDF or printer canvases have a resolution much >>>>> higher than the screen. I mean there are much more pixels in the canvas. So >>>>> things get smaller on output if not properly scaled, text also. The >>>>> approach depends on the application. >>>>> >>>>> Notice that applications are starting to have the same problem on >>>>> screen when the user has a 4k monitor. By default Windows will scale all >>>>> the application output. In the IUP documentation we explain how to avoid >>>>> that automatic scale, but the the application should be able to display its >>>>> interface in a high resolution. >>>>> >>>>> Best, >>>>> Scuri >>>>> >>>>> >>>>> Em ter., 24 de mar. de 2020 às 05:38, Milind Gupta < >>>>> mil...@gm...> escreveu: >>>>> >>>>>> Hi Antonio, >>>>>> When I use cd.PRINTER canvas to print the text scaling is >>>>>> not coming out right. For example see the the attached file. When I press >>>>>> the button and press print the drawing shows up in the lower left corner as >>>>>> expected but the text is quite out of proportion. I am doing this on >>>>>> windows. It doesn't matter if I use an actual printer or use the Adobe PDF >>>>>> printer (output attached) the result is the same. >>>>>> How can I fix the text scaling to be right? >>>>>> >>>>>> Thanks, >>>>>> Milind >>>>>> _______________________________________________ >>>>>> Canvasdraw-users mailing list >>>>>> Can...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>>>> >>>>> _______________________________________________ >>>>> Canvasdraw-users mailing list >>>>> Can...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>>> >>>> _______________________________________________ >>> Iup-users mailing list >>> Iup...@li... >>> https://lists.sourceforge.net/lists/listinfo/iup-users >>> >> _______________________________________________ >> Canvasdraw-users mailing list >> Can...@li... >> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >> > _______________________________________________ > Iup-users mailing list > Iup...@li... > https://lists.sourceforge.net/lists/listinfo/iup-users > |
From: Milind G. <mil...@gm...> - 2020-03-24 23:48:48
|
Yes this one does not have scaling because I was just doing an example to check proportionality. So what I understand is to be consistent across different canvases where pixels/mm are different I should internally store the size of text I display in pixels? That way when I implement scaling it would be on pixels and remain consistent. But when I tried to convert the pt size to pixels I am not having good results. For example to convert 12 pts to pixels I did this: cd.MM2Pixel(12/cd.MM2PT, 12/cd.MM2PT ) But this returns 0. How do I translate this? On Tue, Mar 24, 2020 at 12:48 PM Antonio Scuri <ant...@gm...> wrote: > Hi, > > That sample has no scaling. I least I couldn't find any. > > I run it and print it. Yes the text looks larger because it is using the > default font which is specified in points, not in pixels. > > Best, > Scuri > > > Em ter., 24 de mar. de 2020 às 16:42, Milind Gupta <mil...@gm...> > escreveu: > >> For example the screen shows the graphic as: >> >> [image: image.png] >> >> While the printout shows it like: >> [image: image.png] >> The text gets totally out of proportion to the rest of the drawing >> compared to the screen for the same size. >> >> On Tue, Mar 24, 2020 at 12:38 PM Milind Gupta <mil...@gm...> >> wrote: >> >>> Actually the problem is the scaling is not the same on the screen >>> compared to the printer. So the issue is if I scale the drawing and the >>> text proportionally to fir the number of pixels the text gets much more >>> larger. >>> To understand that if you just run the script and see how it >>> looks on the screen compared to on the printer you can see that the scaling >>> of the text and the graphics is not proportional. The text ends up much >>> larger in printer than on the screen. >>> >>> On Tue, Mar 24, 2020 at 12:29 PM Antonio Scuri <ant...@gm...> >>> wrote: >>> >>>> Hi, >>>> >>>> That's expected. The PDF or printer canvases have a resolution much >>>> higher than the screen. I mean there are much more pixels in the canvas. So >>>> things get smaller on output if not properly scaled, text also. The >>>> approach depends on the application. >>>> >>>> Notice that applications are starting to have the same problem on >>>> screen when the user has a 4k monitor. By default Windows will scale all >>>> the application output. In the IUP documentation we explain how to avoid >>>> that automatic scale, but the the application should be able to display its >>>> interface in a high resolution. >>>> >>>> Best, >>>> Scuri >>>> >>>> >>>> Em ter., 24 de mar. de 2020 às 05:38, Milind Gupta < >>>> mil...@gm...> escreveu: >>>> >>>>> Hi Antonio, >>>>> When I use cd.PRINTER canvas to print the text scaling is not >>>>> coming out right. For example see the the attached file. When I press the >>>>> button and press print the drawing shows up in the lower left corner as >>>>> expected but the text is quite out of proportion. I am doing this on >>>>> windows. It doesn't matter if I use an actual printer or use the Adobe PDF >>>>> printer (output attached) the result is the same. >>>>> How can I fix the text scaling to be right? >>>>> >>>>> Thanks, >>>>> Milind >>>>> _______________________________________________ >>>>> Canvasdraw-users mailing list >>>>> Can...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>>> >>>> _______________________________________________ >>>> Canvasdraw-users mailing list >>>> Can...@li... >>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>> >>> _______________________________________________ >> Iup-users mailing list >> Iup...@li... >> https://lists.sourceforge.net/lists/listinfo/iup-users >> > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > |
From: Antonio S. <ant...@gm...> - 2020-03-24 19:47:51
|
Hi, That sample has no scaling. I least I couldn't find any. I run it and print it. Yes the text looks larger because it is using the default font which is specified in points, not in pixels. Best, Scuri Em ter., 24 de mar. de 2020 às 16:42, Milind Gupta <mil...@gm...> escreveu: > For example the screen shows the graphic as: > > [image: image.png] > > While the printout shows it like: > [image: image.png] > The text gets totally out of proportion to the rest of the drawing > compared to the screen for the same size. > > On Tue, Mar 24, 2020 at 12:38 PM Milind Gupta <mil...@gm...> > wrote: > >> Actually the problem is the scaling is not the same on the screen >> compared to the printer. So the issue is if I scale the drawing and the >> text proportionally to fir the number of pixels the text gets much more >> larger. >> To understand that if you just run the script and see how it looks >> on the screen compared to on the printer you can see that the scaling of >> the text and the graphics is not proportional. The text ends up much larger >> in printer than on the screen. >> >> On Tue, Mar 24, 2020 at 12:29 PM Antonio Scuri <ant...@gm...> >> wrote: >> >>> Hi, >>> >>> That's expected. The PDF or printer canvases have a resolution much >>> higher than the screen. I mean there are much more pixels in the canvas. So >>> things get smaller on output if not properly scaled, text also. The >>> approach depends on the application. >>> >>> Notice that applications are starting to have the same problem on >>> screen when the user has a 4k monitor. By default Windows will scale all >>> the application output. In the IUP documentation we explain how to avoid >>> that automatic scale, but the the application should be able to display its >>> interface in a high resolution. >>> >>> Best, >>> Scuri >>> >>> >>> Em ter., 24 de mar. de 2020 às 05:38, Milind Gupta < >>> mil...@gm...> escreveu: >>> >>>> Hi Antonio, >>>> When I use cd.PRINTER canvas to print the text scaling is not >>>> coming out right. For example see the the attached file. When I press the >>>> button and press print the drawing shows up in the lower left corner as >>>> expected but the text is quite out of proportion. I am doing this on >>>> windows. It doesn't matter if I use an actual printer or use the Adobe PDF >>>> printer (output attached) the result is the same. >>>> How can I fix the text scaling to be right? >>>> >>>> Thanks, >>>> Milind >>>> _______________________________________________ >>>> Canvasdraw-users mailing list >>>> Can...@li... >>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>> >>> _______________________________________________ >>> Canvasdraw-users mailing list >>> Can...@li... >>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>> >> _______________________________________________ > Iup-users mailing list > Iup...@li... > https://lists.sourceforge.net/lists/listinfo/iup-users > |
From: Milind G. <mil...@gm...> - 2020-03-24 19:41:48
|
For example the screen shows the graphic as: [image: image.png] While the printout shows it like: [image: image.png] The text gets totally out of proportion to the rest of the drawing compared to the screen for the same size. On Tue, Mar 24, 2020 at 12:38 PM Milind Gupta <mil...@gm...> wrote: > Actually the problem is the scaling is not the same on the screen compared > to the printer. So the issue is if I scale the drawing and the text > proportionally to fir the number of pixels the text gets much more larger. > To understand that if you just run the script and see how it looks > on the screen compared to on the printer you can see that the scaling of > the text and the graphics is not proportional. The text ends up much larger > in printer than on the screen. > > On Tue, Mar 24, 2020 at 12:29 PM Antonio Scuri <ant...@gm...> > wrote: > >> Hi, >> >> That's expected. The PDF or printer canvases have a resolution much >> higher than the screen. I mean there are much more pixels in the canvas. So >> things get smaller on output if not properly scaled, text also. The >> approach depends on the application. >> >> Notice that applications are starting to have the same problem on >> screen when the user has a 4k monitor. By default Windows will scale all >> the application output. In the IUP documentation we explain how to avoid >> that automatic scale, but the the application should be able to display its >> interface in a high resolution. >> >> Best, >> Scuri >> >> >> Em ter., 24 de mar. de 2020 às 05:38, Milind Gupta < >> mil...@gm...> escreveu: >> >>> Hi Antonio, >>> When I use cd.PRINTER canvas to print the text scaling is not >>> coming out right. For example see the the attached file. When I press the >>> button and press print the drawing shows up in the lower left corner as >>> expected but the text is quite out of proportion. I am doing this on >>> windows. It doesn't matter if I use an actual printer or use the Adobe PDF >>> printer (output attached) the result is the same. >>> How can I fix the text scaling to be right? >>> >>> Thanks, >>> Milind >>> _______________________________________________ >>> Canvasdraw-users mailing list >>> Can...@li... >>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>> >> _______________________________________________ >> Canvasdraw-users mailing list >> Can...@li... >> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >> > |
From: Milind G. <mil...@gm...> - 2020-03-24 19:38:41
|
Actually the problem is the scaling is not the same on the screen compared to the printer. So the issue is if I scale the drawing and the text proportionally to fir the number of pixels the text gets much more larger. To understand that if you just run the script and see how it looks on the screen compared to on the printer you can see that the scaling of the text and the graphics is not proportional. The text ends up much larger in printer than on the screen. On Tue, Mar 24, 2020 at 12:29 PM Antonio Scuri <ant...@gm...> wrote: > Hi, > > That's expected. The PDF or printer canvases have a resolution much > higher than the screen. I mean there are much more pixels in the canvas. So > things get smaller on output if not properly scaled, text also. The > approach depends on the application. > > Notice that applications are starting to have the same problem on screen > when the user has a 4k monitor. By default Windows will scale all the > application output. In the IUP documentation we explain how to avoid that > automatic scale, but the the application should be able to display its > interface in a high resolution. > > Best, > Scuri > > > Em ter., 24 de mar. de 2020 às 05:38, Milind Gupta <mil...@gm...> > escreveu: > >> Hi Antonio, >> When I use cd.PRINTER canvas to print the text scaling is not >> coming out right. For example see the the attached file. When I press the >> button and press print the drawing shows up in the lower left corner as >> expected but the text is quite out of proportion. I am doing this on >> windows. It doesn't matter if I use an actual printer or use the Adobe PDF >> printer (output attached) the result is the same. >> How can I fix the text scaling to be right? >> >> Thanks, >> Milind >> _______________________________________________ >> Canvasdraw-users mailing list >> Can...@li... >> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >> > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > |
From: Antonio S. <ant...@gm...> - 2020-03-24 19:29:40
|
Hi, That's expected. The PDF or printer canvases have a resolution much higher than the screen. I mean there are much more pixels in the canvas. So things get smaller on output if not properly scaled, text also. The approach depends on the application. Notice that applications are starting to have the same problem on screen when the user has a 4k monitor. By default Windows will scale all the application output. In the IUP documentation we explain how to avoid that automatic scale, but the the application should be able to display its interface in a high resolution. Best, Scuri Em ter., 24 de mar. de 2020 às 05:38, Milind Gupta <mil...@gm...> escreveu: > Hi Antonio, > When I use cd.PRINTER canvas to print the text scaling is not > coming out right. For example see the the attached file. When I press the > button and press print the drawing shows up in the lower left corner as > expected but the text is quite out of proportion. I am doing this on > windows. It doesn't matter if I use an actual printer or use the Adobe PDF > printer (output attached) the result is the same. > How can I fix the text scaling to be right? > > Thanks, > Milind > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > |
From: Milind G. <mil...@gm...> - 2020-03-24 08:38:02
|
Hi Antonio, When I use cd.PRINTER canvas to print the text scaling is not coming out right. For example see the the attached file. When I press the button and press print the drawing shows up in the lower left corner as expected but the text is quite out of proportion. I am doing this on windows. It doesn't matter if I use an actual printer or use the Adobe PDF printer (output attached) the result is the same. How can I fix the text scaling to be right? Thanks, Milind |
From: Antonio S. <ant...@gm...> - 2020-03-07 16:08:08
|
> Does LineStyle, LineWidth, LineJoin and LineCap affect the raster text in any way? No > Do they affect the vector text? Yes Best, Scuri Em sex., 6 de mar. de 2020 às 18:09, Milind Gupta <mil...@gm...> escreveu: > Hi Antonio, > Does LineStyle, LineWidth, LineJoin and LineCap affect the > raster text in any way? Do they affect the vector text? > > Thanks, > Milind > > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > |
From: Milind G. <mil...@gm...> - 2020-03-06 21:09:32
|
Hi Antonio, Does LineStyle, LineWidth, LineJoin and LineCap affect the raster text in any way? Do they affect the vector text? Thanks, Milind |
From: Milind G. <mil...@gm...> - 2020-03-05 17:25:03
|
Thank you very much Antonio! On Wed, Mar 4, 2020, 10:09 AM Antonio Scuri <ant...@gm...> wrote: > Hi, > > Finally I got some time to look at this. > > You used a CD_IMAGE driver to implement the third buffer. It is ok, but > you miss drawing that image on the main canvas. Simply calling flush for > that canvas does nothing because it is just a canvas that draws on an > image, it does not know that the image must be transferred to another > canvas. > > So, we can solve that in two ways. > > First you can simply draw the cdImage into the cdbCanvas by calling > "cdbCanvas:PutImageRect(cdImage, 0, 0 , 0, 0 , 0, 0)" instead of > "cdbbCanvas:Flush()". But when the dialog is resized the image must be > recreated so the CD_IMAGE driver. > > Or you can use the CD_DBUFFER driver that will do all that for you, and > the image will be hidden inside the canvas. > > I attached the two modified samples to illustrates the two solutions. > > Best, > Scuri > > > Em qua., 26 de fev. de 2020 às 20:01, Antonio Scuri < > ant...@gm...> escreveu: > >> Hi, >> >> I will tomorrow. >> >> Best, >> Scuri >> >> >> Em qua, 26 de fev de 2020 19:55, Milind Gupta <mil...@gm...> >> escreveu: >> >>> Hi Antonio, >>> If you can have a look at my example and suggest me modifications >>> that would be very helpful. >>> >>> Thanks, >>> Milind >>> >>> On Fri, Feb 7, 2020, 11:05 AM Milind Gupta <mil...@gm...> >>> wrote: >>> >>>> Hi Antonio, >>>> If you can have a look at my example and suggest me modifications >>>> that would be very helpful. >>>> >>>> Thanks, >>>> Milind >>>> >>>> On Fri, Jan 31, 2020 at 12:36 PM Milind Gupta <mil...@gm...> >>>> wrote: >>>> >>>>> No problem, enjoy your vacation. Just attaching here another try I >>>>> did, improving it as my understanding. >>>>> >>>>> Thanks, >>>>> Milind >>>>> >>>>> On Fri, Jan 31, 2020 at 7:06 AM Antonio Scuri <ant...@gm...> >>>>> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I'm on vacation during this week. I'll answer as soon as I have >>>>>> some time. >>>>>> >>>>>> Best, >>>>>> Scuri >>>>>> >>>>>> >>>>>> Em sex, 31 de jan de 2020 02:34, Milind Gupta <mil...@gm...> >>>>>> escreveu: >>>>>> >>>>>>> Hi Antonio, >>>>>>> I am a little lost on how to set this up. I have the >>>>>>> following script where I am trying to make a cdImage where I will put the >>>>>>> drawing which does not change and then I want to use cdbCanvas to draw >>>>>>> changes. I am not able to figure out how to use cdImage as a buffer for >>>>>>> cdbCanvas. >>>>>>> >>>>>>> What I expect from the script is when I start it, it should show me >>>>>>> the blue lines already from cdImage. Once I press the button then I should >>>>>>> see additional drawing that was drawn on cdbCanvas. >>>>>>> >>>>>>> On Sat, Jan 25, 2020 at 3:02 PM Antonio Scuri < >>>>>>> ant...@gm...> wrote: >>>>>>> >>>>>>>> A double buffer canvas such as CD_IUPDBUFFER is actually a CD_IUP >>>>>>>> that automatically manages an image where everything is draw and this image >>>>>>>> is drawn in the CD_IUP canvas when flush is called. >>>>>>>> >>>>>>>> So, you can do any buffers you want but you will have to manually >>>>>>>> manage the image using cdCanvasCreateImage and a CD_IMAGE canvas to draw in >>>>>>>> the image. Notice that your main canvas can still be a CD_IUPDBUFFER. >>>>>>>> >>>>>>>> Best, >>>>>>>> Scuri >>>>>>>> >>>>>>>> >>>>>>>> Em sex., 24 de jan. de 2020 às 19:06, Milind Gupta < >>>>>>>> mil...@gm...> escreveu: >>>>>>>> >>>>>>>>> Hi, >>>>>>>>> Is it possible to add a buffer to a buffer canvas? If >>>>>>>>> there is a part of a drawing that rarely changes it can be drawn in the 3rd >>>>>>>>> canvas and flushed to the buffer canvas before doing the other changes. >>>>>>>>> >>>>>>>>> Milind >>>>>>>>> _______________________________________________ >>>>>>>>> Canvasdraw-users mailing list >>>>>>>>> Can...@li... >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Canvasdraw-users mailing list >>>>>>>> Can...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>>>>>> >>>>>>> _______________________________________________ >>>>>>> Canvasdraw-users mailing list >>>>>>> Can...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>>>>> >>>>>> _______________________________________________ >>>>>> Canvasdraw-users mailing list >>>>>> Can...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>>>> >>>>> _______________________________________________ >>> Canvasdraw-users mailing list >>> Can...@li... >>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>> >> _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > |
From: Antonio S. <ant...@gm...> - 2020-03-04 18:09:40
|
Hi, Finally I got some time to look at this. You used a CD_IMAGE driver to implement the third buffer. It is ok, but you miss drawing that image on the main canvas. Simply calling flush for that canvas does nothing because it is just a canvas that draws on an image, it does not know that the image must be transferred to another canvas. So, we can solve that in two ways. First you can simply draw the cdImage into the cdbCanvas by calling "cdbCanvas:PutImageRect(cdImage, 0, 0 , 0, 0 , 0, 0)" instead of "cdbbCanvas:Flush()". But when the dialog is resized the image must be recreated so the CD_IMAGE driver. Or you can use the CD_DBUFFER driver that will do all that for you, and the image will be hidden inside the canvas. I attached the two modified samples to illustrates the two solutions. Best, Scuri Em qua., 26 de fev. de 2020 às 20:01, Antonio Scuri <ant...@gm...> escreveu: > Hi, > > I will tomorrow. > > Best, > Scuri > > > Em qua, 26 de fev de 2020 19:55, Milind Gupta <mil...@gm...> > escreveu: > >> Hi Antonio, >> If you can have a look at my example and suggest me modifications >> that would be very helpful. >> >> Thanks, >> Milind >> >> On Fri, Feb 7, 2020, 11:05 AM Milind Gupta <mil...@gm...> >> wrote: >> >>> Hi Antonio, >>> If you can have a look at my example and suggest me modifications >>> that would be very helpful. >>> >>> Thanks, >>> Milind >>> >>> On Fri, Jan 31, 2020 at 12:36 PM Milind Gupta <mil...@gm...> >>> wrote: >>> >>>> No problem, enjoy your vacation. Just attaching here another try I did, >>>> improving it as my understanding. >>>> >>>> Thanks, >>>> Milind >>>> >>>> On Fri, Jan 31, 2020 at 7:06 AM Antonio Scuri <ant...@gm...> >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> I'm on vacation during this week. I'll answer as soon as I have some >>>>> time. >>>>> >>>>> Best, >>>>> Scuri >>>>> >>>>> >>>>> Em sex, 31 de jan de 2020 02:34, Milind Gupta <mil...@gm...> >>>>> escreveu: >>>>> >>>>>> Hi Antonio, >>>>>> I am a little lost on how to set this up. I have the >>>>>> following script where I am trying to make a cdImage where I will put the >>>>>> drawing which does not change and then I want to use cdbCanvas to draw >>>>>> changes. I am not able to figure out how to use cdImage as a buffer for >>>>>> cdbCanvas. >>>>>> >>>>>> What I expect from the script is when I start it, it should show me >>>>>> the blue lines already from cdImage. Once I press the button then I should >>>>>> see additional drawing that was drawn on cdbCanvas. >>>>>> >>>>>> On Sat, Jan 25, 2020 at 3:02 PM Antonio Scuri < >>>>>> ant...@gm...> wrote: >>>>>> >>>>>>> A double buffer canvas such as CD_IUPDBUFFER is actually a CD_IUP >>>>>>> that automatically manages an image where everything is draw and this image >>>>>>> is drawn in the CD_IUP canvas when flush is called. >>>>>>> >>>>>>> So, you can do any buffers you want but you will have to manually >>>>>>> manage the image using cdCanvasCreateImage and a CD_IMAGE canvas to draw in >>>>>>> the image. Notice that your main canvas can still be a CD_IUPDBUFFER. >>>>>>> >>>>>>> Best, >>>>>>> Scuri >>>>>>> >>>>>>> >>>>>>> Em sex., 24 de jan. de 2020 às 19:06, Milind Gupta < >>>>>>> mil...@gm...> escreveu: >>>>>>> >>>>>>>> Hi, >>>>>>>> Is it possible to add a buffer to a buffer canvas? If >>>>>>>> there is a part of a drawing that rarely changes it can be drawn in the 3rd >>>>>>>> canvas and flushed to the buffer canvas before doing the other changes. >>>>>>>> >>>>>>>> Milind >>>>>>>> _______________________________________________ >>>>>>>> Canvasdraw-users mailing list >>>>>>>> Can...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>>>>>> >>>>>>> _______________________________________________ >>>>>>> Canvasdraw-users mailing list >>>>>>> Can...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>>>>> >>>>>> _______________________________________________ >>>>>> Canvasdraw-users mailing list >>>>>> Can...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>>>> >>>>> _______________________________________________ >>>>> Canvasdraw-users mailing list >>>>> Can...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>>> >>>> _______________________________________________ >> Canvasdraw-users mailing list >> Can...@li... >> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >> > |
From: Antonio S. <ant...@gm...> - 2020-02-26 23:01:25
|
Hi, I will tomorrow. Best, Scuri Em qua, 26 de fev de 2020 19:55, Milind Gupta <mil...@gm...> escreveu: > Hi Antonio, > If you can have a look at my example and suggest me modifications > that would be very helpful. > > Thanks, > Milind > > On Fri, Feb 7, 2020, 11:05 AM Milind Gupta <mil...@gm...> wrote: > >> Hi Antonio, >> If you can have a look at my example and suggest me modifications >> that would be very helpful. >> >> Thanks, >> Milind >> >> On Fri, Jan 31, 2020 at 12:36 PM Milind Gupta <mil...@gm...> >> wrote: >> >>> No problem, enjoy your vacation. Just attaching here another try I did, >>> improving it as my understanding. >>> >>> Thanks, >>> Milind >>> >>> On Fri, Jan 31, 2020 at 7:06 AM Antonio Scuri <ant...@gm...> >>> wrote: >>> >>>> Hi, >>>> >>>> I'm on vacation during this week. I'll answer as soon as I have some >>>> time. >>>> >>>> Best, >>>> Scuri >>>> >>>> >>>> Em sex, 31 de jan de 2020 02:34, Milind Gupta <mil...@gm...> >>>> escreveu: >>>> >>>>> Hi Antonio, >>>>> I am a little lost on how to set this up. I have the >>>>> following script where I am trying to make a cdImage where I will put the >>>>> drawing which does not change and then I want to use cdbCanvas to draw >>>>> changes. I am not able to figure out how to use cdImage as a buffer for >>>>> cdbCanvas. >>>>> >>>>> What I expect from the script is when I start it, it should show me >>>>> the blue lines already from cdImage. Once I press the button then I should >>>>> see additional drawing that was drawn on cdbCanvas. >>>>> >>>>> On Sat, Jan 25, 2020 at 3:02 PM Antonio Scuri <ant...@gm...> >>>>> wrote: >>>>> >>>>>> A double buffer canvas such as CD_IUPDBUFFER is actually a CD_IUP >>>>>> that automatically manages an image where everything is draw and this image >>>>>> is drawn in the CD_IUP canvas when flush is called. >>>>>> >>>>>> So, you can do any buffers you want but you will have to manually >>>>>> manage the image using cdCanvasCreateImage and a CD_IMAGE canvas to draw in >>>>>> the image. Notice that your main canvas can still be a CD_IUPDBUFFER. >>>>>> >>>>>> Best, >>>>>> Scuri >>>>>> >>>>>> >>>>>> Em sex., 24 de jan. de 2020 às 19:06, Milind Gupta < >>>>>> mil...@gm...> escreveu: >>>>>> >>>>>>> Hi, >>>>>>> Is it possible to add a buffer to a buffer canvas? If there >>>>>>> is a part of a drawing that rarely changes it can be drawn in the 3rd >>>>>>> canvas and flushed to the buffer canvas before doing the other changes. >>>>>>> >>>>>>> Milind >>>>>>> _______________________________________________ >>>>>>> Canvasdraw-users mailing list >>>>>>> Can...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>>>>> >>>>>> _______________________________________________ >>>>>> Canvasdraw-users mailing list >>>>>> Can...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>>>> >>>>> _______________________________________________ >>>>> Canvasdraw-users mailing list >>>>> Can...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>>> >>>> _______________________________________________ >>>> Canvasdraw-users mailing list >>>> Can...@li... >>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>> >>> _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > |
From: Milind G. <mil...@gm...> - 2020-02-26 22:55:53
|
Hi Antonio, If you can have a look at my example and suggest me modifications that would be very helpful. Thanks, Milind On Fri, Feb 7, 2020, 11:05 AM Milind Gupta <mil...@gm...> wrote: > Hi Antonio, > If you can have a look at my example and suggest me modifications > that would be very helpful. > > Thanks, > Milind > > On Fri, Jan 31, 2020 at 12:36 PM Milind Gupta <mil...@gm...> > wrote: > >> No problem, enjoy your vacation. Just attaching here another try I did, >> improving it as my understanding. >> >> Thanks, >> Milind >> >> On Fri, Jan 31, 2020 at 7:06 AM Antonio Scuri <ant...@gm...> >> wrote: >> >>> Hi, >>> >>> I'm on vacation during this week. I'll answer as soon as I have some >>> time. >>> >>> Best, >>> Scuri >>> >>> >>> Em sex, 31 de jan de 2020 02:34, Milind Gupta <mil...@gm...> >>> escreveu: >>> >>>> Hi Antonio, >>>> I am a little lost on how to set this up. I have the >>>> following script where I am trying to make a cdImage where I will put the >>>> drawing which does not change and then I want to use cdbCanvas to draw >>>> changes. I am not able to figure out how to use cdImage as a buffer for >>>> cdbCanvas. >>>> >>>> What I expect from the script is when I start it, it should show me the >>>> blue lines already from cdImage. Once I press the button then I should see >>>> additional drawing that was drawn on cdbCanvas. >>>> >>>> On Sat, Jan 25, 2020 at 3:02 PM Antonio Scuri <ant...@gm...> >>>> wrote: >>>> >>>>> A double buffer canvas such as CD_IUPDBUFFER is actually a CD_IUP >>>>> that automatically manages an image where everything is draw and this image >>>>> is drawn in the CD_IUP canvas when flush is called. >>>>> >>>>> So, you can do any buffers you want but you will have to manually >>>>> manage the image using cdCanvasCreateImage and a CD_IMAGE canvas to draw in >>>>> the image. Notice that your main canvas can still be a CD_IUPDBUFFER. >>>>> >>>>> Best, >>>>> Scuri >>>>> >>>>> >>>>> Em sex., 24 de jan. de 2020 às 19:06, Milind Gupta < >>>>> mil...@gm...> escreveu: >>>>> >>>>>> Hi, >>>>>> Is it possible to add a buffer to a buffer canvas? If there >>>>>> is a part of a drawing that rarely changes it can be drawn in the 3rd >>>>>> canvas and flushed to the buffer canvas before doing the other changes. >>>>>> >>>>>> Milind >>>>>> _______________________________________________ >>>>>> Canvasdraw-users mailing list >>>>>> Can...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>>>> >>>>> _______________________________________________ >>>>> Canvasdraw-users mailing list >>>>> Can...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>>> >>>> _______________________________________________ >>>> Canvasdraw-users mailing list >>>> Can...@li... >>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>> >>> _______________________________________________ >>> Canvasdraw-users mailing list >>> Can...@li... >>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>> >> |
From: Milind G. <mil...@gm...> - 2020-02-07 19:05:33
|
Hi Antonio, If you can have a look at my example and suggest me modifications that would be very helpful. Thanks, Milind On Fri, Jan 31, 2020 at 12:36 PM Milind Gupta <mil...@gm...> wrote: > No problem, enjoy your vacation. Just attaching here another try I did, > improving it as my understanding. > > Thanks, > Milind > > On Fri, Jan 31, 2020 at 7:06 AM Antonio Scuri <ant...@gm...> > wrote: > >> Hi, >> >> I'm on vacation during this week. I'll answer as soon as I have some >> time. >> >> Best, >> Scuri >> >> >> Em sex, 31 de jan de 2020 02:34, Milind Gupta <mil...@gm...> >> escreveu: >> >>> Hi Antonio, >>> I am a little lost on how to set this up. I have the >>> following script where I am trying to make a cdImage where I will put the >>> drawing which does not change and then I want to use cdbCanvas to draw >>> changes. I am not able to figure out how to use cdImage as a buffer for >>> cdbCanvas. >>> >>> What I expect from the script is when I start it, it should show me the >>> blue lines already from cdImage. Once I press the button then I should see >>> additional drawing that was drawn on cdbCanvas. >>> >>> On Sat, Jan 25, 2020 at 3:02 PM Antonio Scuri <ant...@gm...> >>> wrote: >>> >>>> A double buffer canvas such as CD_IUPDBUFFER is actually a CD_IUP >>>> that automatically manages an image where everything is draw and this image >>>> is drawn in the CD_IUP canvas when flush is called. >>>> >>>> So, you can do any buffers you want but you will have to manually >>>> manage the image using cdCanvasCreateImage and a CD_IMAGE canvas to draw in >>>> the image. Notice that your main canvas can still be a CD_IUPDBUFFER. >>>> >>>> Best, >>>> Scuri >>>> >>>> >>>> Em sex., 24 de jan. de 2020 às 19:06, Milind Gupta < >>>> mil...@gm...> escreveu: >>>> >>>>> Hi, >>>>> Is it possible to add a buffer to a buffer canvas? If there >>>>> is a part of a drawing that rarely changes it can be drawn in the 3rd >>>>> canvas and flushed to the buffer canvas before doing the other changes. >>>>> >>>>> Milind >>>>> _______________________________________________ >>>>> Canvasdraw-users mailing list >>>>> Can...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>>> >>>> _______________________________________________ >>>> Canvasdraw-users mailing list >>>> Can...@li... >>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>> >>> _______________________________________________ >>> Canvasdraw-users mailing list >>> Can...@li... >>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>> >> _______________________________________________ >> Canvasdraw-users mailing list >> Can...@li... >> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >> > |
From: Milind G. <mil...@gm...> - 2020-01-31 20:36:24
|
No problem, enjoy your vacation. Just attaching here another try I did, improving it as my understanding. Thanks, Milind On Fri, Jan 31, 2020 at 7:06 AM Antonio Scuri <ant...@gm...> wrote: > Hi, > > I'm on vacation during this week. I'll answer as soon as I have some > time. > > Best, > Scuri > > > Em sex, 31 de jan de 2020 02:34, Milind Gupta <mil...@gm...> > escreveu: > >> Hi Antonio, >> I am a little lost on how to set this up. I have the following >> script where I am trying to make a cdImage where I will put the drawing >> which does not change and then I want to use cdbCanvas to draw changes. I >> am not able to figure out how to use cdImage as a buffer for cdbCanvas. >> >> What I expect from the script is when I start it, it should show me the >> blue lines already from cdImage. Once I press the button then I should see >> additional drawing that was drawn on cdbCanvas. >> >> On Sat, Jan 25, 2020 at 3:02 PM Antonio Scuri <ant...@gm...> >> wrote: >> >>> A double buffer canvas such as CD_IUPDBUFFER is actually a CD_IUP that >>> automatically manages an image where everything is draw and this image is >>> drawn in the CD_IUP canvas when flush is called. >>> >>> So, you can do any buffers you want but you will have to manually >>> manage the image using cdCanvasCreateImage and a CD_IMAGE canvas to draw in >>> the image. Notice that your main canvas can still be a CD_IUPDBUFFER. >>> >>> Best, >>> Scuri >>> >>> >>> Em sex., 24 de jan. de 2020 às 19:06, Milind Gupta < >>> mil...@gm...> escreveu: >>> >>>> Hi, >>>> Is it possible to add a buffer to a buffer canvas? If there is >>>> a part of a drawing that rarely changes it can be drawn in the 3rd canvas >>>> and flushed to the buffer canvas before doing the other changes. >>>> >>>> Milind >>>> _______________________________________________ >>>> Canvasdraw-users mailing list >>>> Can...@li... >>>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>>> >>> _______________________________________________ >>> Canvasdraw-users mailing list >>> Can...@li... >>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>> >> _______________________________________________ >> Canvasdraw-users mailing list >> Can...@li... >> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >> > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > |
From: Antonio S. <ant...@gm...> - 2020-01-31 15:05:58
|
Hi, I'm on vacation during this week. I'll answer as soon as I have some time. Best, Scuri Em sex, 31 de jan de 2020 02:34, Milind Gupta <mil...@gm...> escreveu: > Hi Antonio, > I am a little lost on how to set this up. I have the following > script where I am trying to make a cdImage where I will put the drawing > which does not change and then I want to use cdbCanvas to draw changes. I > am not able to figure out how to use cdImage as a buffer for cdbCanvas. > > What I expect from the script is when I start it, it should show me the > blue lines already from cdImage. Once I press the button then I should see > additional drawing that was drawn on cdbCanvas. > > On Sat, Jan 25, 2020 at 3:02 PM Antonio Scuri <ant...@gm...> > wrote: > >> A double buffer canvas such as CD_IUPDBUFFER is actually a CD_IUP that >> automatically manages an image where everything is draw and this image is >> drawn in the CD_IUP canvas when flush is called. >> >> So, you can do any buffers you want but you will have to manually >> manage the image using cdCanvasCreateImage and a CD_IMAGE canvas to draw in >> the image. Notice that your main canvas can still be a CD_IUPDBUFFER. >> >> Best, >> Scuri >> >> >> Em sex., 24 de jan. de 2020 às 19:06, Milind Gupta < >> mil...@gm...> escreveu: >> >>> Hi, >>> Is it possible to add a buffer to a buffer canvas? If there is >>> a part of a drawing that rarely changes it can be drawn in the 3rd canvas >>> and flushed to the buffer canvas before doing the other changes. >>> >>> Milind >>> _______________________________________________ >>> Canvasdraw-users mailing list >>> Can...@li... >>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>> >> _______________________________________________ >> Canvasdraw-users mailing list >> Can...@li... >> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >> > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > |
From: Milind G. <mil...@gm...> - 2020-01-31 07:33:58
|
Hi Antonio, I am a little lost on how to set this up. I have the following script where I am trying to make a cdImage where I will put the drawing which does not change and then I want to use cdbCanvas to draw changes. I am not able to figure out how to use cdImage as a buffer for cdbCanvas. What I expect from the script is when I start it, it should show me the blue lines already from cdImage. Once I press the button then I should see additional drawing that was drawn on cdbCanvas. On Sat, Jan 25, 2020 at 3:02 PM Antonio Scuri <ant...@gm...> wrote: > A double buffer canvas such as CD_IUPDBUFFER is actually a CD_IUP that > automatically manages an image where everything is draw and this image is > drawn in the CD_IUP canvas when flush is called. > > So, you can do any buffers you want but you will have to manually manage > the image using cdCanvasCreateImage and a CD_IMAGE canvas to draw in the > image. Notice that your main canvas can still be a CD_IUPDBUFFER. > > Best, > Scuri > > > Em sex., 24 de jan. de 2020 às 19:06, Milind Gupta <mil...@gm...> > escreveu: > >> Hi, >> Is it possible to add a buffer to a buffer canvas? If there is a >> part of a drawing that rarely changes it can be drawn in the 3rd canvas and >> flushed to the buffer canvas before doing the other changes. >> >> Milind >> _______________________________________________ >> Canvasdraw-users mailing list >> Can...@li... >> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >> > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > |
From: Antonio S. <ant...@gm...> - 2020-01-25 23:02:30
|
A double buffer canvas such as CD_IUPDBUFFER is actually a CD_IUP that automatically manages an image where everything is draw and this image is drawn in the CD_IUP canvas when flush is called. So, you can do any buffers you want but you will have to manually manage the image using cdCanvasCreateImage and a CD_IMAGE canvas to draw in the image. Notice that your main canvas can still be a CD_IUPDBUFFER. Best, Scuri Em sex., 24 de jan. de 2020 às 19:06, Milind Gupta <mil...@gm...> escreveu: > Hi, > Is it possible to add a buffer to a buffer canvas? If there is a > part of a drawing that rarely changes it can be drawn in the 3rd canvas and > flushed to the buffer canvas before doing the other changes. > > Milind > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > |
From: Milind G. <mil...@gm...> - 2020-01-24 22:06:34
|
Hi, Is it possible to add a buffer to a buffer canvas? If there is a part of a drawing that rarely changes it can be drawn in the 3rd canvas and flushed to the buffer canvas before doing the other changes. Milind |
From: Milind G. <mil...@gm...> - 2020-01-24 22:02:10
|
Thanks On Fri, Jan 24, 2020 at 1:00 PM Antonio Scuri <ant...@gm...> wrote: > Hi, > > It is because we use a different technique in Windows to draw lines when > LineWidth=1, a cosmetic pen. Don't rely on the sizes and the alignment of > the custom line styles. Although they are usually equivalent to pixels they > may depend on the driver. > > Best, > Scuri > > > Em qui., 23 de jan. de 2020 às 17:31, Milind Gupta <mil...@gm...> > escreveu: > >> A little more information. If I add LineWidth = 2 after setting the line >> style then only it works properly. Why does LineWidth=1 not work? >> >> On Wed, Jan 22, 2020 at 6:09 PM Milind Gupta <mil...@gm...> >> wrote: >> >>> Hi, >>> I created a custom linestyle of 1 dot and 9 spaces. When I plot this >>> line I see multiple dots and a much longer space. The attached script plots >>> it as a horizontal line and creates some vertical markers below which the >>> dots were expected. The dots however are not aligned to those vertical >>> markers. Am I specifying the style array incorrectly? >>> >>> Thanks, >>> Milind >>> >> _______________________________________________ >> Canvasdraw-users mailing list >> Can...@li... >> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >> > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > |