---
name: "Gnome2::Canvas::Item"
section: "3pm"
platform: "linux"
package: "libgnome2-canvas-perl"
version: "1.002-4+b1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/Gnome2::Canvas::Item"
---

# Gnome2::Canvas::Item(3pm)

Base class for all canvas items

## NAME

Gnome2::Canvas::Item - Base class for all canvas items

## HIERARCHY

```
  Glib::Object
  +----Glib::InitiallyUnowned
       +----Gtk2::Object
            +----Gnome2::Canvas::Item
```

## METHODS

### item = Gnome2::Canvas::Item-\>new ($parent, $object\_class, ...)

- •

  `$parent` (Gnome2::Canvas::Group)

- •

  `$object_class` (string)

- •

  ... (list) property name =\> value pairs

Factory constructor for Gnome2::Canvas::Item subclasses.

### $item-\>affine\_absolute ($affine)

- •

  `$affine` (arrayref) affine transformation matrix

Replaces *$item*'s transformation matrix.

### $item-\>affine\_relative ($affine)

- •

  `$affine` (arrayref) affine transformation matrix

Combines *$affine* with *$item*'s current transformation.

### (x1, y1, x2, y2) = $item-\>get\_bounds

### $canvas = $item-\>canvas

Fetch the Gnome2::Canvas to which *$item* is attached.

### grabstatus = $item-\>grab ($event\_mask, $cursor, $etime=GDK\_CURRENT\_TIME)

- •

  `$event_mask` (Gtk2::Gdk::EventMask)

- •

  `$cursor` (Gtk2::Gdk::Cursor)

- •

  `$etime` (unsigned)

### $item-\>grab\_focus

### $item-\>hide

### $affine = $item-\>i2c\_affine

Fetch the affine transform that converts from item-relative coordinates to canvas pixel coordinates.

Note: This method was completely broken for all `$Gnome2::Canvas::VERSION` \< 1.002.

### (x, y) = $item-\>i2w ($x, $y)

- •

  `$x` (double)

- •

  `$y` (double)

### $affine = $item-\>i2w\_affine

Fetch the affine transform that converts from item's coordinate system to world coordinates.

Note: This method was completely broken for all `$Gnome2::Canvas::VERSION` \< 1.002.

### $item-\>lower ($positions)

- •

  `$positions` (integer)

### $item-\>lower\_to\_bottom

### $item-\>move ($dx, $dy)

- •

  `$dx` (double)

- •

  `$dy` (double)

### $canvasgroup = $item-\>parent

Fetch *$item*'s parent group item.

### $item-\>raise ($positions)

- •

  `$positions` (integer)

### $item-\>raise\_to\_top

### $item-\>reparent ($new\_group)

- •

  `$new_group` (Gnome2::Canvas::Group)

### $item-\>request\_update

### $item-\>reset\_bounds

Reset the bounding box of *$item* to an empty rectangle.

### $item-\>show

### $item-\>ungrab ($etime=GDK\_CURRENT\_TIME)

- •

  `$etime` (unsigned)

### $item-\>update\_bbox ($x1, $y1, $x2, $y2)

- •

  `$x1` (integer)

- •

  `$y1` (integer)

- •

  `$x2` (integer)

- •

  `$y2` (integer)

Set *$item*'s bounding box to a new rectangle, and request a full repaint.

### (x, y) = $item-\>w2i ($x, $y)

- •

  `$x` (double)

- •

  `$y` (double)

## PROPERTIES

- 'parent' (Gnome2::Canvas::Item : default undef : readable / writable)

  ## SIGNALS

- boolean = **event** (Gnome2::Canvas::Item, Gtk2::Gdk::Event)

  ## ENUMS AND FLAGS

### flags Gtk2::Gdk::EventMask

- •

  'exposure-mask' / 'GDK\_EXPOSURE\_MASK'

- •

  'pointer-motion-mask' / 'GDK\_POINTER\_MOTION\_MASK'

- •

  'pointer-motion-hint-mask' / 'GDK\_POINTER\_MOTION\_HINT\_MASK'

- •

  'button-motion-mask' / 'GDK\_BUTTON\_MOTION\_MASK'

- •

  'button1-motion-mask' / 'GDK\_BUTTON1\_MOTION\_MASK'

- •

  'button2-motion-mask' / 'GDK\_BUTTON2\_MOTION\_MASK'

- •

  'button3-motion-mask' / 'GDK\_BUTTON3\_MOTION\_MASK'

- •

  'button-press-mask' / 'GDK\_BUTTON\_PRESS\_MASK'

- •

  'button-release-mask' / 'GDK\_BUTTON\_RELEASE\_MASK'

- •

  'key-press-mask' / 'GDK\_KEY\_PRESS\_MASK'

- •

  'key-release-mask' / 'GDK\_KEY\_RELEASE\_MASK'

- •

  'enter-notify-mask' / 'GDK\_ENTER\_NOTIFY\_MASK'

- •

  'leave-notify-mask' / 'GDK\_LEAVE\_NOTIFY\_MASK'

- •

  'focus-change-mask' / 'GDK\_FOCUS\_CHANGE\_MASK'

- •

  'structure-mask' / 'GDK\_STRUCTURE\_MASK'

- •

  'property-change-mask' / 'GDK\_PROPERTY\_CHANGE\_MASK'

- •

  'visibility-notify-mask' / 'GDK\_VISIBILITY\_NOTIFY\_MASK'

- •

  'proximity-in-mask' / 'GDK\_PROXIMITY\_IN\_MASK'

- •

  'proximity-out-mask' / 'GDK\_PROXIMITY\_OUT\_MASK'

- •

  'substructure-mask' / 'GDK\_SUBSTRUCTURE\_MASK'

- •

  'scroll-mask' / 'GDK\_SCROLL\_MASK'

- •

  'all-events-mask' / 'GDK\_ALL\_EVENTS\_MASK'

### enum Gtk2::Gdk::GrabStatus

- •

  'success' / 'GDK\_GRAB\_SUCCESS'

- •

  'already-grabbed' / 'GDK\_GRAB\_ALREADY\_GRABBED'

- •

  'invalid-time' / 'GDK\_GRAB\_INVALID\_TIME'

- •

  'not-viewable' / 'GDK\_GRAB\_NOT\_VIEWABLE'

- •

  'frozen' / 'GDK\_GRAB\_FROZEN'

## SEE ALSO

Gnome2::Canvas, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object

## COPYRIGHT

Copyright (C) 2003-2004 by the Gtk2-Perl Team.

This software is licensed under the LGPL; see Gnome2::Canvas for a full notice.
