• Capturing a widget to photo

    From Luc@luc@sep.invalid to comp.lang.tcl on Mon Mar 4 15:59:39 2024
    From Newsgroup: comp.lang.tcl

    I am reading this:

    https://wiki.tcl-lang.org/page/Capture+a+window+into+an+image

    And I found this:

    set baseImg [image create photo -format window -data $win]

    Where did -format window come from?

    I'm reading the manual pages of image and photo and can't find any
    mention of that possibility anywhere. How did this person guess that
    'window' was a valid option?

    Neither can I find any clue to why the path to a widget is a valid
    option for -data.

    It works, but it only captures the visible part of the text widget.
    I want to capture all of it. Is it possible?
    --
    Luc


    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Rich@rich@example.invalid to comp.lang.tcl on Mon Mar 4 19:16:39 2024
    From Newsgroup: comp.lang.tcl

    Luc <luc@sep.invalid> wrote:
    I am reading this:

    https://wiki.tcl-lang.org/page/Capture+a+window+into+an+image

    And I found this:

    set baseImg [image create photo -format window -data $win]

    Where did -format window come from?

    I'm reading the manual pages of image and photo and can't find any
    mention of that possibility anywhere. How did this person guess that
    'window' was a valid option?

    It is an extension added on by the Img extension, which is mentioned at
    the top of the page you cite:

    David Easton 17 Mar 2003 This uses the *Img* package to capture a
    screenshot of a widget hierarchy or toplevel window into a photo image.

    And therefore the documentation for it is part of Img.

    Neither can I find any clue to why the path to a widget is a valid
    option for -data.

    An extension provided by the Img package.

    It works, but it only captures the visible part of the text widget.
    I want to capture all of it. Is it possible?

    IIRC the Img package capture widget to image file aspect only works for
    the visible on-screen parts of widgets.
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Robert Heller@heller@deepsoft.com to comp.lang.tcl on Mon Mar 4 20:55:38 2024
    From Newsgroup: comp.lang.tcl

    At Mon, 4 Mar 2024 15:59:39 -0300 Luc <luc@sep.invalid> wrote:

    I am reading this:

    https://wiki.tcl-lang.org/page/Capture+a+window+into+an+image

    And I found this:

    set baseImg [image create photo -format window -data $win]

    Where did -format window come from?

    I'm reading the manual pages of image and photo and can't find any
    mention of that possibility anywhere. How did this person guess that
    'window' was a valid option?

    Neither can I find any clue to why the path to a widget is a valid
    option for -data.

    It works, but it only captures the visible part of the text widget.
    I want to capture all of it. Is it possible?

    It is part of the Img package.

    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    heller@deepsoft.com -- Webhosting Services
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Paul Obermeier@obermeier@poSoft.de to comp.lang.tcl on Mon Mar 4 22:03:36 2024
    From Newsgroup: comp.lang.tcl

    Am 04.03.2024 um 20:16 schrieb Rich:
    Luc <luc@sep.invalid> wrote:
    I am reading this:

    https://wiki.tcl-lang.org/page/Capture+a+window+into+an+image

    And I found this:

    set baseImg [image create photo -format window -data $win]

    Where did -format window come from?

    I'm reading the manual pages of image and photo and can't find any
    mention of that possibility anywhere. How did this person guess that
    'window' was a valid option?

    It is an extension added on by the Img extension, which is mentioned at
    the top of the page you cite:

    David Easton 17 Mar 2003 This uses the *Img* package to capture a
    screenshot of a widget hierarchy or toplevel window into a photo image.

    And therefore the documentation for it is part of Img.

    Neither can I find any clue to why the path to a widget is a valid
    option for -data.

    An extension provided by the Img package.

    It works, but it only captures the visible part of the text widget.
    I want to capture all of it. Is it possible?

    IIRC the Img package capture widget to image file aspect only works for
    the visible on-screen parts of widgets.

    See proc canvas2Photo by George Petasis at Wiki page https://wiki.tcl-lang.org/page/Img

    Paul
    --- Synchronet 3.20a-Linux NewsLink 1.114