canvasdraw-users Mailing List for CD (Page 3)
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: Antonio S. <ant...@gm...> - 2019-04-08 20:24:11
|
And I forgot to add, you must call cdInitContexPlus once, for instance where you call IupOpen. No particular order. Best, Scuri Em seg, 8 de abr de 2019 17:15, Matic Kukovec <kuk...@ho...> escreveu: > Hi Antonio, > > I tried adding *cdUseContextPlus(1)* before *cdCreateCanvas* but nothing > changes. I added it to the "*MAP_CB*" callback where it is created: > > > int canvas_map_cb(Ihandle* canvas) > { > > cdUseContextPlus(1); > cdCanvas* cd_canvas = cdCreateCanvas(CD_IUPDBUFFER, canvas); > > IupSetAttribute(canvas, "cdCanvas", (char*)cd_canvas); > return IUP_DEFAULT; > > } > > This is what I get: > Just for information, I'm using a very simplified and adapted version of > *example4_3.c* from the website, into which I just added the CD code. > > I have a feeling I'm still missing something, any ideas? > > Thanks, > Matic > ------------------------------ > *From:* Antonio Scuri <ant...@gm...> > *Sent:* Monday, April 8, 2019 10:00 PM > *To:* CD discussion list. > *Subject:* Re: [Canvasdraw-users] Draw a gradient > > Hi, > > Are you calling cdUseContextPlus(1) before cdCreateCanvas? > > Best, > Scuri > > > Em seg, 8 de abr de 2019 16:46, Matic Kukovec <kuk...@ho...> > escreveu: > > Hi guys, > > I'm trying to draw a gradient using the code shown in the *Drivers > > Context Plus > GDI+* documentation, which I'm using inside the > *iup_canvas's* "*ACTION*" callback: > > int canvas_action_cb(Ihandle* iup_canvas) > { > > int w, h; > > cdCanvas* cd_canvas = (cdCanvas*)IupGetAttribute(iup_canvas, "cdCanvas"); > IupGetIntInt(canvas, "DRAWSIZE", &w, &h); > cdCanvasForeground(cd_canvas, CD_YELLOW); > cdCanvasBackground(cd_canvas, CD_GREEN); > cdCanvasSetfAttribute(cd_canvas, "LINEARGRADIENT", "%d 200 %d 250", w - > 150, w - 100); /* x1 y1 x2 y2 */ > cdCanvasBox(cd_canvas, w - 150, w - 100, 200, 250); > cdCanvasFlush(cd_canvas); > return IUP_DEFAULT; > > } > > but it just draws a rectangle instead of gradient. I know this is working > because I can draw a line or rectangle (with cdCanvasLine and cdCanvasRect) > without any problems. > I do not have any experience with this, so could someone help me please? > > I'm on Windows 10 x64 using IUP 3.26 and CD 5.12. > > Thanks, > Matic > > > _______________________________________________ > 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: Matic K. <kuk...@ho...> - 2019-04-08 20:15:54
|
Hi Antonio, I tried adding cdUseContextPlus(1) before cdCreateCanvas but nothing changes. I added it to the "MAP_CB" callback where it is created: int canvas_map_cb(Ihandle* canvas) { cdUseContextPlus(1); cdCanvas* cd_canvas = cdCreateCanvas(CD_IUPDBUFFER, canvas); IupSetAttribute(canvas, "cdCanvas", (char*)cd_canvas); return IUP_DEFAULT; } This is what I get: [cid:4afab0ce-85d5-4500-9f74-59c07a98333c] Just for information, I'm using a very simplified and adapted version of example4_3.c from the website, into which I just added the CD code. I have a feeling I'm still missing something, any ideas? Thanks, Matic ________________________________ From: Antonio Scuri <ant...@gm...> Sent: Monday, April 8, 2019 10:00 PM To: CD discussion list. Subject: Re: [Canvasdraw-users] Draw a gradient Hi, Are you calling cdUseContextPlus(1) before cdCreateCanvas? Best, Scuri Em seg, 8 de abr de 2019 16:46, Matic Kukovec <kuk...@ho...<mailto:kuk...@ho...>> escreveu: Hi guys, I'm trying to draw a gradient using the code shown in the Drivers > Context Plus > GDI+ documentation, which I'm using inside the iup_canvas's "ACTION" callback: int canvas_action_cb(Ihandle* iup_canvas) { int w, h; cdCanvas* cd_canvas = (cdCanvas*)IupGetAttribute(iup_canvas, "cdCanvas"); IupGetIntInt(canvas, "DRAWSIZE", &w, &h); cdCanvasForeground(cd_canvas, CD_YELLOW); cdCanvasBackground(cd_canvas, CD_GREEN); cdCanvasSetfAttribute(cd_canvas, "LINEARGRADIENT", "%d 200 %d 250", w - 150, w - 100); /* x1 y1 x2 y2 */ cdCanvasBox(cd_canvas, w - 150, w - 100, 200, 250); cdCanvasFlush(cd_canvas); return IUP_DEFAULT; } but it just draws a rectangle instead of gradient. I know this is working because I can draw a line or rectangle (with cdCanvasLine and cdCanvasRect) without any problems. I do not have any experience with this, so could someone help me please? I'm on Windows 10 x64 using IUP 3.26 and CD 5.12. Thanks, Matic _______________________________________________ Canvasdraw-users mailing list Can...@li...<mailto:Can...@li...> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users |
From: Antonio S. <ant...@gm...> - 2019-04-08 20:01:08
|
Hi, Are you calling cdUseContextPlus(1) before cdCreateCanvas? Best, Scuri Em seg, 8 de abr de 2019 16:46, Matic Kukovec <kuk...@ho...> escreveu: > Hi guys, > > I'm trying to draw a gradient using the code shown in the *Drivers > > Context Plus > GDI+* documentation, which I'm using inside the > *iup_canvas's* "*ACTION*" callback: > > int canvas_action_cb(Ihandle* iup_canvas) > { > > int w, h; > > cdCanvas* cd_canvas = (cdCanvas*)IupGetAttribute(iup_canvas, "cdCanvas"); > IupGetIntInt(canvas, "DRAWSIZE", &w, &h); > cdCanvasForeground(cd_canvas, CD_YELLOW); > cdCanvasBackground(cd_canvas, CD_GREEN); > cdCanvasSetfAttribute(cd_canvas, "LINEARGRADIENT", "%d 200 %d 250", w - > 150, w - 100); /* x1 y1 x2 y2 */ > cdCanvasBox(cd_canvas, w - 150, w - 100, 200, 250); > cdCanvasFlush(cd_canvas); > return IUP_DEFAULT; > > } > > but it just draws a rectangle instead of gradient. I know this is working > because I can draw a line or rectangle (with cdCanvasLine and cdCanvasRect) > without any problems. > I do not have any experience with this, so could someone help me please? > > I'm on Windows 10 x64 using IUP 3.26 and CD 5.12. > > Thanks, > Matic > > > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > |
From: Matic K. <kuk...@ho...> - 2019-04-08 19:46:45
|
Hi guys, I'm trying to draw a gradient using the code shown in the Drivers > Context Plus > GDI+ documentation, which I'm using inside the iup_canvas's "ACTION" callback: int canvas_action_cb(Ihandle* iup_canvas) { int w, h; cdCanvas* cd_canvas = (cdCanvas*)IupGetAttribute(iup_canvas, "cdCanvas"); IupGetIntInt(canvas, "DRAWSIZE", &w, &h); cdCanvasForeground(cd_canvas, CD_YELLOW); cdCanvasBackground(cd_canvas, CD_GREEN); cdCanvasSetfAttribute(cd_canvas, "LINEARGRADIENT", "%d 200 %d 250", w - 150, w - 100); /* x1 y1 x2 y2 */ cdCanvasBox(cd_canvas, w - 150, w - 100, 200, 250); cdCanvasFlush(cd_canvas); return IUP_DEFAULT; } but it just draws a rectangle instead of gradient. I know this is working because I can draw a line or rectangle (with cdCanvasLine and cdCanvasRect) without any problems. I do not have any experience with this, so could someone help me please? I'm on Windows 10 x64 using IUP 3.26 and CD 5.12. Thanks, Matic |
From: Antonio S. <ant...@gm...> - 2019-01-08 00:58:16
|
Hi All, The 5.12 version of the CD library has been released. This version includes a new Direct 2D base driver (optional use) and a standard implementation for gradients in drivers were it were supported. 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...> - 2017-07-01 20:03:18
|
Hi All, The 5.11.1 version of the CD library has been released. This version includes just 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...> - 2017-04-11 16:33:03
|
There are a few examples in IM and in IUP examples folder. Best, Scuri On Sun, Apr 9, 2017 at 9:28 PM, Milind Gupta <mil...@gm...> wrote: > Hi Antonio, > I have a CD Canvas as the driver for iupcanvas. I want to place a > png image on the canvas. What is the easiest way to do it? > I have the image as iup image rgba and I can also load it using the > IM library but how do I get it to a CD image or CD bitmap to put it on a > canvas? > > Thanks, > Milind > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > > |
From: Milind G. <mil...@gm...> - 2017-04-10 00:28:54
|
Hi Antonio, I have a CD Canvas as the driver for iupcanvas. I want to place a png image on the canvas. What is the easiest way to do it? I have the image as iup image rgba and I can also load it using the IM library but how do I get it to a CD image or CD bitmap to put it on a canvas? Thanks, Milind |
From: Antonio S. <ant...@gm...> - 2016-10-02 04:48:47
|
Hi All, The 5.11 version of the CD library has been released. This version includes just two changes in CD_PPTX driver: - new MASTERSLIDE attribute to allow draw in the Master Slide - new MASTERSLIDEFILE attribute to allow import the Master Slide of another PPTX. 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...> - 2016-06-30 17:35:05
|
Hi All, The 5.10 version of the CD library has been released. We would like to highlight the following features: - New: driver *CD_PPTX *to build a Microsoft PowerPoint presentation. - New: *UTF8MODE *attribute for CD_PDF driver. - Changed: *zlib*, *FreeType* and *FTGL* are now external libraries. 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...> - 2015-09-18 17:54:46
|
Hi All, The 5.9 version of the CD library has been released. We would like to highlight the following features: New: header "cd_plus.h" with the first version of the C++ API. New: CD_IMIMAGE driver. New utilities cdCanvasGetImImage, cdCanvasPatternImImage, cdCanvasStippleImImage and cdCanvasPutImImage. Changed: cdcontextplus library in Linux was restored. Must be linked to use the Cairo context plus driver for GTK. Changed: removed include "cd_old.h" from "cd.h", must be manually included by old applications. Notice that the old API will be removed in future versions. Changed: Lua pre-compiled binaries are now separated by folders Lua51/Lua52/Lua53. Fixed: removed luaL_register dependency from Lua >= 5.2 bindings. Fixed: added missing wdCanvasPlay, wdCanvasGetImageRGB, cdfCanvasPixel, cdfCanvasMark, cdfCanvasPutImageRectRGB, cdfCanvasPutImageRectRGBA, cdfCanvasPutImageRectMap, cdfCanvasPutImImage, cdfCanvasGetImImage, wdCanvasPutImImage, wdCanvasGetImImage, cdfCanvasGetTextBox, and cdfCanvasGetTextBounds. 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: Milind G. <mil...@gm...> - 2014-11-30 07:08:45
|
I figured out that when using cd.CreateBitmap I need to use cd.PutBitmap. Its working well now. Thanks, Milind On Sat, Nov 29, 2014 at 8:19 AM, Milind Gupta <mil...@gm...> wrote: > Hi, > I see in the documentation that CreateImageRGBA is marked as > deprecated. So I used CreateBitmap and used the return bitmap's r,g,b > tables to set the colors of the pixels using the index as > [row*width+column]. > Now when I try to use PutImageRectRGBA to place that bitmap (object > returned by CreateBitmap) it gives me an error saying: (cdImageRGBA > expected, got userdata). In the cd simpledraw example CreateImageRGBA was > used which directly gave a cdImageRGBA. > How do I convert a bitmap to cdImageRGBA to put it on a canvas? > > Thanks, > Milind > |
From: Milind G. <mil...@gm...> - 2014-11-29 16:19:45
|
Hi, I see in the documentation that CreateImageRGBA is marked as deprecated. So I used CreateBitmap and used the return bitmap's r,g,b tables to set the colors of the pixels using the index as [row*width+column]. Now when I try to use PutImageRectRGBA to place that bitmap (object returned by CreateBitmap) it gives me an error saying: (cdImageRGBA expected, got userdata). In the cd simpledraw example CreateImageRGBA was used which directly gave a cdImageRGBA. How do I convert a bitmap to cdImageRGBA to put it on a canvas? Thanks, Milind |
From: Antonio S. <sc...@te...> - 2014-11-28 15:50:31
|
The idea is to use that function to invert the coordinates of the IUP canvas callbacks to the CD orientation and implement the application using only the CD orientation.. Best, Scuri On Fri, Nov 28, 2014 at 1:20 PM, Milind Gupta <mil...@gm...> wrote: > I thought the function would invert the Y axis so that all subsequent y > coordinates will be interpreted in the inverted axis but it seems it just > gives the inversion for 1 given coordinate. What is the difference of > running this function than just doing totaly-ycoordinate. > It would be great if the axis of the canvas can match the axis of iup > canvasbox. Setting the position for an element in canvasbox takes the > origin at the top left corner while for canvas draw it takes it at the > bottom left corner. Is there a function to actually invert the y axis > permanently for either of them? > > Thanks, > Milind > > On Fri, Nov 28, 2014 at 6:07 AM, Antonio Scuri <sc...@te...> > wrote: > >> Documentation is right after canvas:UpdateYAxis. >> >> Best, >> Scuri >> >> >> On Fri, Nov 28, 2014 at 5:35 AM, Milind Gupta <mil...@gm...> >> wrote: >> >>> Hi, >>> What is the number parameter passed to invertYAxis function? I >>> am not able to find a description for that. >>> >>> Thanks, >>> Milind >>> >>> >>> ------------------------------------------------------------------------------ >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >>> with Interactivity, Sharing, Native Excel Exports, App Integration & more >>> Get technology previously reserved for billion-dollar corporations, FREE >>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Canvasdraw-users mailing list >>> Can...@li... >>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>> >>> >> >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> >> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk >> _______________________________________________ >> Canvasdraw-users mailing list >> Can...@li... >> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >> >> > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > > |
From: Milind G. <mil...@gm...> - 2014-11-28 15:20:24
|
I thought the function would invert the Y axis so that all subsequent y coordinates will be interpreted in the inverted axis but it seems it just gives the inversion for 1 given coordinate. What is the difference of running this function than just doing totaly-ycoordinate. It would be great if the axis of the canvas can match the axis of iup canvasbox. Setting the position for an element in canvasbox takes the origin at the top left corner while for canvas draw it takes it at the bottom left corner. Is there a function to actually invert the y axis permanently for either of them? Thanks, Milind On Fri, Nov 28, 2014 at 6:07 AM, Antonio Scuri <sc...@te...> wrote: > Documentation is right after canvas:UpdateYAxis. > > Best, > Scuri > > > On Fri, Nov 28, 2014 at 5:35 AM, Milind Gupta <mil...@gm...> > wrote: > >> Hi, >> What is the number parameter passed to invertYAxis function? I am >> not able to find a description for that. >> >> Thanks, >> Milind >> >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> >> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk >> _______________________________________________ >> Canvasdraw-users mailing list >> Can...@li... >> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >> >> > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > > |
From: Antonio S. <sc...@te...> - 2014-11-28 14:07:29
|
Documentation is right after canvas:UpdateYAxis. Best, Scuri On Fri, Nov 28, 2014 at 5:35 AM, Milind Gupta <mil...@gm...> wrote: > Hi, > What is the number parameter passed to invertYAxis function? I am > not able to find a description for that. > > Thanks, > Milind > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > > |
From: Milind G. <mil...@gm...> - 2014-11-28 07:35:23
|
Hi, What is the number parameter passed to invertYAxis function? I am not able to find a description for that. Thanks, Milind |
From: Antonio S. <ant...@gm...> - 2014-11-20 20:54:56
|
Hi All, The 5.8.1 version of the CD library has been released. We would like to highlight the following changes: - In Linux 3.13 the default native library is now Cairo. Thereby there is no XOR support. - The CD_GL driver suffered numerous fixes in order to make their use as transparent as possible. - The FTGL was again adjusted so that the appearance of fonts would be as close as possible to the native fonts. The IupGLControls controls and the new IupPlot controls benefit directly from these last two changes. Regards, Antonio Scuri |
From: Antonio S. <sc...@te...> - 2014-09-24 21:58:24
|
Hi, There is a sample in the IM samples called "screencapture.lua" that uses CD to capture the screen. The code is quite simple: require"imlua" require"cdlua" require"cdluaim" local canvas = cd.CreateCanvas(cd.NATIVEWINDOW, nil) canvas:Activate() local w, h = canvas:GetSize() local image = im.ImageCreate(w, h, im.RGB, im.BYTE) image:cdCanvasGetImage(canvas, 0, 0) error = image:Save("screencapture.jpg", "JPEG") image:Destroy() if (error) then print("error = "..error) end Best, Scuri On Mon, Sep 22, 2014 at 5:39 PM, Milind Gupta <mil...@gm...> wrote: > I was trying to save the screenshot I got from createcanvas. I finally by > trial and error figured out a way to do that as follows: > > c = cd.CreateCanvas(cd.NATIVEWINDOW,cd.NULL) > w,h = c:GetSize() > b = cd.CreateBitmap(w,h,cd.RGB) > c:GetBitmap(b,0,0) > i = b:imImageCreate() > i:Save("screenshot.jpg","JPEG") > > Is that the right way to do it? > > Thanks, > Milind > > > On Mon, Sep 22, 2014 at 7:40 AM, Antonio Scuri <sc...@te...> > wrote: > >> Yes, check the CD documentation in Guide / Samples / Off Screen >> Drawing section. >> >> You can draw in an RGB buffer. >> >> Or you can capture the canvas using cdCanvasGetImageRGB. Sorry I didn't >> wrote a Lua sample for that case. >> >> Best, >> Scuri >> >> >> On Sun, Sep 21, 2014 at 10:22 PM, Milind Gupta <mil...@gm...> >> wrote: >> >>> Hi, >>> How can I save a canvas object as an image file? From the im >>> section I see that I can convert a bitmap to an imImage and then I can save >>> it from there but I cannot seem to find how to convert a canvas object to a >>> bitmap? >>> >>> Thanks, >>> Milind >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >>> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >>> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >>> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Canvasdraw-users mailing list >>> Can...@li... >>> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >>> >>> >> >> >> ------------------------------------------------------------------------------ >> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >> >> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk >> _______________________________________________ >> Canvasdraw-users mailing list >> Can...@li... >> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >> >> > > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > > |
From: Milind G. <mil...@gm...> - 2014-09-22 20:39:52
|
I was trying to save the screenshot I got from createcanvas. I finally by trial and error figured out a way to do that as follows: c = cd.CreateCanvas(cd.NATIVEWINDOW,cd.NULL) w,h = c:GetSize() b = cd.CreateBitmap(w,h,cd.RGB) c:GetBitmap(b,0,0) i = b:imImageCreate() i:Save("screenshot.jpg","JPEG") Is that the right way to do it? Thanks, Milind On Mon, Sep 22, 2014 at 7:40 AM, Antonio Scuri <sc...@te...> wrote: > Yes, check the CD documentation in Guide / Samples / Off Screen Drawing > section. > > You can draw in an RGB buffer. > > Or you can capture the canvas using cdCanvasGetImageRGB. Sorry I didn't > wrote a Lua sample for that case. > > Best, > Scuri > > > On Sun, Sep 21, 2014 at 10:22 PM, Milind Gupta <mil...@gm...> > wrote: > >> Hi, >> How can I save a canvas object as an image file? From the im >> section I see that I can convert a bitmap to an imImage and then I can save >> it from there but I cannot seem to find how to convert a canvas object to a >> bitmap? >> >> Thanks, >> Milind >> >> >> >> ------------------------------------------------------------------------------ >> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >> >> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk >> _______________________________________________ >> Canvasdraw-users mailing list >> Can...@li... >> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >> >> > > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > > |
From: Antonio S. <sc...@te...> - 2014-09-22 14:40:49
|
Yes, check the CD documentation in Guide / Samples / Off Screen Drawing section. You can draw in an RGB buffer. Or you can capture the canvas using cdCanvasGetImageRGB. Sorry I didn't wrote a Lua sample for that case. Best, Scuri On Sun, Sep 21, 2014 at 10:22 PM, Milind Gupta <mil...@gm...> wrote: > Hi, > How can I save a canvas object as an image file? From the im section > I see that I can convert a bitmap to an imImage and then I can save it from > there but I cannot seem to find how to convert a canvas object to a bitmap? > > Thanks, > Milind > > > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > > |
From: Milind G. <mil...@gm...> - 2014-09-22 01:22:57
|
Hi, How can I save a canvas object as an image file? From the im section I see that I can convert a bitmap to an imImage and then I can save it from there but I cannot seem to find how to convert a canvas object to a bitmap? Thanks, Milind |
From: Milind G. <mil...@gm...> - 2014-09-04 16:21:39
|
Thanks, Milind On Thu, Sep 4, 2014 at 7:27 AM, Antonio Scuri <sc...@te...> wrote: > Hi Milind, > > Not all graphics systems have this feature. So CD only has it for a few > drivers, current only in the Context Plus drivers, i.e. GDI+ in Windows and > Cairo in Linux. > > On the other hand, if you don't need to export your graphics to a meta > file, then you can use OpenGL instead of CD. This type of feature is more > natural in OpenGL. > > Best, > Scuri > > > > > > On Wed, Sep 3, 2014 at 8:34 PM, Milind Gupta <mil...@gm...> > wrote: > >> Hi, >> I am creating a canvas in iup and I want to create a gradient >> fill in a rectangle whose edge starts with 1 color and opposite edge at >> another color. Is it possible to do using CD. What functions can I use to >> do that? >> >> Thanks, >> Milind >> >> >> >> ------------------------------------------------------------------------------ >> Slashdot TV. >> Video for Nerds. Stuff that matters. >> http://tv.slashdot.org/ >> _______________________________________________ >> Canvasdraw-users mailing list >> Can...@li... >> https://lists.sourceforge.net/lists/listinfo/canvasdraw-users >> >> > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > > |
From: Antonio S. <sc...@te...> - 2014-09-04 14:28:03
|
Hi Milind, Not all graphics systems have this feature. So CD only has it for a few drivers, current only in the Context Plus drivers, i.e. GDI+ in Windows and Cairo in Linux. On the other hand, if you don't need to export your graphics to a meta file, then you can use OpenGL instead of CD. This type of feature is more natural in OpenGL. Best, Scuri On Wed, Sep 3, 2014 at 8:34 PM, Milind Gupta <mil...@gm...> wrote: > Hi, > I am creating a canvas in iup and I want to create a gradient fill > in a rectangle whose edge starts with 1 color and opposite edge at another > color. Is it possible to do using CD. What functions can I use to do that? > > Thanks, > Milind > > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Canvasdraw-users mailing list > Can...@li... > https://lists.sourceforge.net/lists/listinfo/canvasdraw-users > > |
From: Milind G. <mil...@gm...> - 2014-09-03 23:35:04
|
Hi, I am creating a canvas in iup and I want to create a gradient fill in a rectangle whose edge starts with 1 color and opposite edge at another color. Is it possible to do using CD. What functions can I use to do that? Thanks, Milind |