GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Gtk2::Gdk::GC(3) User Contributed Perl Documentation Gtk2::Gdk::GC(3)

Gtk2::Gdk::GC - wrapper for GdkGC

  Glib::Object
  +----Gtk2::Gdk::GC

  • $drawable (Gtk2::Gdk::Drawable)
  • $values (scalar)

Create and return a new GC.

$drawable is used for the depth and the display ("Gtk2::Gdk::Display") for the GC. The GC can then be used with any drawable of the same depth on that display.

$values is a hashref containing some of the following keys,

    foreground          Gtk2::Gdk::Color
    background          Gtk2::Gdk::Color
    font                Gtk2::Gdk::Font
    function            Gtk2::Gdk::Function enum
    fill                Gtk2::Gdk::Fill enum
    tile                Gtk2::Gdk::Pixmap
    stipple             Gtk2::Gdk::Pixmap
    clip_mask           Gtk2::Gdk::Pixmap
    subwindow_mode      Gtk2::Gdk::SubwindowMode enum
    ts_x_origin         integer
    ts_y_origin         integer
    clip_x_origin       integer
    clip_y_origin       integer
    graphics_exposures  boolean integer 1 or 0
    line_width          integer
    line_style          Gtk2::Gdk::LineStyle enum
    cap_style           Gtk2::Gdk::CapStyle enum
    join_style          Gtk2::Gdk::JoinStyle enum

Keys not given get default values. For the "foreground" and "background" colour objects only the "pixel" field is used; the red, green and blue are ignored. For example

    my $pixel = 0x123456;
    my $color = Gtk2::Gdk::Color->new (0,0,0, $pixel);
    my $gc = Gtk2::Gdk::GC->new_with_values
      ($win, { foreground => $color,
               line_style => 'on_off_dash' });

  • $drawable (Gtk2::Gdk::Drawable)
  • $values (scalar)

$color (Gtk2::Gdk::Color)

$mask (scalar)

  • $x (integer)
  • $y (integer)

$rectangle (Gtk2::Gdk::Rectangle or undef)

$region (Gtk2::Gdk::Region or undef)

$colormap (Gtk2::Gdk::Colormap)

$src_gc (Gtk2::Gdk::GC)

  • $dash_offset (integer)
  • ... (list) of integers, the length of the dash segments

Sets the way dashed-lines are drawn. Lines will be drawn with alternating on and off segments of the lengths specified in list of dashes. The manner in which the on and off segments are drawn is determined by the line_style value of the GC.

$exposures (boolean)

$fill (Gtk2::Gdk::Fill)

$font (Gtk2::Gdk::Font)

$color (Gtk2::Gdk::Color)

$function (Gtk2::Gdk::Function)

  • $line_width (integer)
  • $line_style (Gtk2::Gdk::LineStyle)
  • $cap_style (Gtk2::Gdk::CapStyle)
  • $join_style (Gtk2::Gdk::JoinStyle)

  • $x_offset (integer)
  • $y_offset (integer)

$rgb (unsigned)

$color (Gtk2::Gdk::Color)

$color (Gtk2::Gdk::Color)

$rgb (unsigned)

$rgb (unsigned)

$rgb (unsigned)

Since: gtk+ 2.2

$stipple (Gtk2::Gdk::Pixmap)

$mode (Gtk2::Gdk::SubwindowMode)

$tile (Gtk2::Gdk::Pixmap)

  • $x (integer)
  • $y (integer)

Return the attributes of $gc in the form of a hashref with keys and values as described with "new" above.

In the "foreground" and "background" colour objects returned only the "pixel" fields are set; the red, green and blue fields are garbage.

$values (scalar)

Set some of the attributes of $gc. $values is a hashref of keys and values as described for "new" and "new_with_values" above. Fields not present in $values are left unchanged.

  • 'not-last' / 'GDK_CAP_NOT_LAST'
  • 'butt' / 'GDK_CAP_BUTT'
  • 'round' / 'GDK_CAP_ROUND'
  • 'projecting' / 'GDK_CAP_PROJECTING'

  • 'solid' / 'GDK_SOLID'
  • 'tiled' / 'GDK_TILED'
  • 'stippled' / 'GDK_STIPPLED'
  • 'opaque-stippled' / 'GDK_OPAQUE_STIPPLED'

  • 'copy' / 'GDK_COPY'
  • 'invert' / 'GDK_INVERT'
  • 'xor' / 'GDK_XOR'
  • 'clear' / 'GDK_CLEAR'
  • 'and' / 'GDK_AND'
  • 'and-reverse' / 'GDK_AND_REVERSE'
  • 'and-invert' / 'GDK_AND_INVERT'
  • 'noop' / 'GDK_NOOP'
  • 'or' / 'GDK_OR'
  • 'equiv' / 'GDK_EQUIV'
  • 'or-reverse' / 'GDK_OR_REVERSE'
  • 'copy-invert' / 'GDK_COPY_INVERT'
  • 'or-invert' / 'GDK_OR_INVERT'
  • 'nand' / 'GDK_NAND'
  • 'nor' / 'GDK_NOR'
  • 'set' / 'GDK_SET'

  • 'miter' / 'GDK_JOIN_MITER'
  • 'round' / 'GDK_JOIN_ROUND'
  • 'bevel' / 'GDK_JOIN_BEVEL'

  • 'solid' / 'GDK_LINE_SOLID'
  • 'on-off-dash' / 'GDK_LINE_ON_OFF_DASH'
  • 'double-dash' / 'GDK_LINE_DOUBLE_DASH'

  • 'clip-by-children' / 'GDK_CLIP_BY_CHILDREN'
  • 'include-inferiors' / 'GDK_INCLUDE_INFERIORS'

Gtk2, Glib::Object

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2 for a full notice.

2022-06-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.