---
name: g.cairocomp
description: Overlays multiple X Pixmaps.
keywords: [ general, display ]
---

# g.cairocomp

Overlays multiple X Pixmaps.

=== "Command line"

    **g.cairocomp**
    [**-d**]
    **input**=*name* [,*name*,...]
    **output**=*name*
    [**visual**=*integer*]
    [**screen**=*integer*]
    [**opacity**=*float* [,*float*,...]]
    **width**=*integer*
    **height**=*integer*
    [**bgcolor**=*name*]
    [**--overwrite**]
    [**--verbose**]
    [**--quiet**]
    [**--qq**]
    [**--ui**]

    Example:

    ```sh
    g.cairocomp input=name output=name width=0 height=0
    ```

=== "Python (grass.tools)"

    *grass.tools.Tools.g_cairocomp*(**input**,
        **output**,
        **visual**=*None*,
        **screen**=*None*,
        **opacity**=*None*,
        **width**,
        **height**,
        **bgcolor**=*None*,
        **flags**=*None*,
        **overwrite**=*None*,
        **verbose**=*None*,
        **quiet**=*None*,
        **superquiet**=*None*)

    Example:

    ```python
    tools = Tools()
    tools.g_cairocomp(input="name", output="name", width=0, height=0)
    ```

    This grass.tools API is experimental in version 8.5 and expected to be stable in version 8.6.

=== "Python (grass.script)"

    *grass.script.run_command*("***g.cairocomp***",
        **input**,
        **output**,
        **visual**=*None*,
        **screen**=*None*,
        **opacity**=*None*,
        **width**,
        **height**,
        **bgcolor**=*None*,
        **flags**=*None*,
        **overwrite**=*None*,
        **verbose**=*None*,
        **quiet**=*None*,
        **superquiet**=*None*)

    Example:

    ```python
    gs.run_command("g.cairocomp", input="name", output="name", width=0, height=0)
    ```

## Parameters

=== "Command line"

    **input**=*name* [,*name*,...] **[required]**  
    &nbsp;&nbsp;&nbsp;&nbsp;Name of input file(s)  
    **output**=*name* **[required]**  
    &nbsp;&nbsp;&nbsp;&nbsp;Name for output file  
    **visual**=*integer*  
    &nbsp;&nbsp;&nbsp;&nbsp;Output Visual XID  
    **screen**=*integer*  
    &nbsp;&nbsp;&nbsp;&nbsp;Output screen  
    **opacity**=*float* [,*float*,...]  
    &nbsp;&nbsp;&nbsp;&nbsp;Layer opacities  
    **width**=*integer* **[required]**  
    &nbsp;&nbsp;&nbsp;&nbsp;Image width  
    **height**=*integer* **[required]**  
    &nbsp;&nbsp;&nbsp;&nbsp;Image height  
    **bgcolor**=*name*  
    &nbsp;&nbsp;&nbsp;&nbsp;Background color (R:G:B:A)  
    &nbsp;&nbsp;&nbsp;&nbsp;Either a standard color name or R:G:B triplet  
    **-d**  
    &nbsp;&nbsp;&nbsp;&nbsp;Do not composite; just delete input Pixmaps  
    **--overwrite**  
    &nbsp;&nbsp;&nbsp;&nbsp;Allow output files to overwrite existing files  
    **--help**  
    &nbsp;&nbsp;&nbsp;&nbsp;Print usage summary  
    **--verbose**  
    &nbsp;&nbsp;&nbsp;&nbsp;Verbose module output  
    **--quiet**  
    &nbsp;&nbsp;&nbsp;&nbsp;Quiet module output  
    **--qq**  
    &nbsp;&nbsp;&nbsp;&nbsp;Very quiet module output  
    **--ui**  
    &nbsp;&nbsp;&nbsp;&nbsp;Force launching GUI dialog

=== "Python (grass.tools)"

    **input** : str | list[str], *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Name of input file(s)  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, file, *name*  
    **output** : str, *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Name for output file  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: output, file, *name*  
    **visual** : int, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Output Visual XID  
    **screen** : int, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Output screen  
    **opacity** : float | list[float] | str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Layer opacities  
    **width** : int, *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Image width  
    **height** : int, *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Image height  
    **bgcolor** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Background color (R:G:B:A)  
    &nbsp;&nbsp;&nbsp;&nbsp;Either a standard color name or R:G:B triplet  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, color, *name*  
    **flags** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Allowed values: *d*  
    &nbsp;&nbsp;&nbsp;&nbsp;**d**  
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Do not composite; just delete input Pixmaps  
    **overwrite** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Allow output files to overwrite existing files  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  
    **verbose** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Verbose module output  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  
    **quiet** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Quiet module output  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  
    **superquiet** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Very quiet module output  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  

    Returns:

    **result** : grass.tools.support.ToolResult | None  
    If the tool produces text as standard output, a *ToolResult* object will be returned. Otherwise, `None` will be returned.

    Raises:

    *grass.tools.ToolError*: When the tool ended with an error.

=== "Python (grass.script)"

    **input** : str | list[str], *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Name of input file(s)  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, file, *name*  
    **output** : str, *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Name for output file  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: output, file, *name*  
    **visual** : int, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Output Visual XID  
    **screen** : int, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Output screen  
    **opacity** : float | list[float] | str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Layer opacities  
    **width** : int, *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Image width  
    **height** : int, *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Image height  
    **bgcolor** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Background color (R:G:B:A)  
    &nbsp;&nbsp;&nbsp;&nbsp;Either a standard color name or R:G:B triplet  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, color, *name*  
    **flags** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Allowed values: *d*  
    &nbsp;&nbsp;&nbsp;&nbsp;**d**  
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Do not composite; just delete input Pixmaps  
    **overwrite** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Allow output files to overwrite existing files  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  
    **verbose** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Verbose module output  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  
    **quiet** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Quiet module output  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  
    **superquiet** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Very quiet module output  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*

## DESCRIPTION

*g.cairocomp* isn't meant for end users.

*g.cairocomp* is similar to *[g.pnmcomp](g.pnmcomp.md)*, except that it
works with X Pixmaps instead of PNM files.

## SEE ALSO

*[g.pnmcomp](g.pnmcomp.md)*

## AUTHOR

Glynn Clements

## SOURCE CODE

Available at: [g.cairocomp source code](https://github.com/OSGeo/grass/tree/main/general/g.cairocomp)
([history](https://github.com/OSGeo/grass/commits/main/general/g.cairocomp))  
Latest change: Thursday May 08 14:35:40 2025 in commit [9528b1e](https://github.com/OSGeo/grass/commit/9528b1e38ba37992c1597a979dc3efbb07b74ec5)
