/////////////////////////////////////////////////////////////////////////////
// Name: src/gtk/dcclient.cpp
/////////////////////////////////////////////////////////////////////////////
// Name: src/gtk/dcclient.cpp
// Author: Robert Roebling
// RCS-ID: $Id$
// Copyright: (c) 1998 Robert Roebling, Chris Breeze
// Author: Robert Roebling
// RCS-ID: $Id$
// Copyright: (c) 1998 Robert Roebling, Chris Breeze
{
#if wxUSE_IMAGE
extern bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y,
{
#if wxUSE_IMAGE
extern bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y,
return wxDoFloodFill( GetOwner(), x, y, col, style);
#else
return wxDoFloodFill( GetOwner(), x, y, col, style);
#else
void wxWindowDCImpl::DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 )
{
wxCHECK_RET( IsOk(), wxT("invalid window dc") );
void wxWindowDCImpl::DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 )
{
wxCHECK_RET( IsOk(), wxT("invalid window dc") );
-void wxWindowDCImpl::DoDrawPolygon( int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset, int WXUNUSED(fillStyle) )
+void wxWindowDCImpl::DoDrawPolygon( int n, wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset,
+ wxPolygonFillMode WXUNUSED(fillStyle) )
// Make a new mask from part of a mask and a clip region.
// Return new mask, unref old one.
static GdkPixmap*
// Make a new mask from part of a mask and a clip region.
// Return new mask, unref old one.
static GdkPixmap*
-ClipMask(GdkPixmap* mask, const GdkRegion* clipRegion, int x, int y, int dst_x, int dst_y, int w, int h)
+ClipMask(GdkPixmap* mask, GdkRegion* clipRegion, int x, int y, int dst_x, int dst_y, int w, int h)
wxCoord width, wxCoord height,
wxDC *source,
wxCoord xsrc, wxCoord ysrc,
wxCoord width, wxCoord height,
wxDC *source,
wxCoord xsrc, wxCoord ysrc,
SetLogicalFunction(logical_func);
if (memDC == NULL)
gdk_gc_set_subwindow(use_gc, GDK_INCLUDE_INFERIORS);
SetLogicalFunction(logical_func);
if (memDC == NULL)
gdk_gc_set_subwindow(use_gc, GDK_INCLUDE_INFERIORS);
gdk_draw_layout_with_colors(m_gdkwindow, m_textGC, x_rtl, y, m_layout, NULL, bg_col);
if (isScaled)
gdk_draw_layout_with_colors(m_gdkwindow, m_textGC, x_rtl, y, m_layout, NULL, bg_col);
if (isScaled)
// avoid code duplication
void wxWindowDCImpl::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y, double angle )
{
// avoid code duplication
void wxWindowDCImpl::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y, double angle )
{
pango_layout_get_pixel_size(m_layout, &w, &h);
const GdkColor* bg_col = NULL;
pango_layout_get_pixel_size(m_layout, &w, &h);
const GdkColor* bg_col = NULL;
pango_context_set_matrix (m_context, &matrix);
pango_layout_context_changed (m_layout);
pango_context_set_matrix (m_context, &matrix);
pango_layout_context_changed (m_layout);
// being at (0, 0)
double x2 = w * cos(rad);
double y2 = -w * sin(rad); // y axis points to the bottom, hence minus
// being at (0, 0)
double x2 = w * cos(rad);
double y2 = -w * sin(rad); // y axis points to the bottom, hence minus
minX = (wxCoord)(dmin(dmin(0, x2), dmin(x3, x4)) - 0.5),
minY = (wxCoord)(dmin(dmin(0, y2), dmin(y3, y4)) - 0.5);
minX = (wxCoord)(dmin(dmin(0, x2), dmin(x3, x4)) - 0.5),
minY = (wxCoord)(dmin(dmin(0, y2), dmin(y3, y4)) - 0.5);
- gdk_draw_layout_with_colors(m_gdkwindow, m_textGC, x+minX, y+minY,
+ gdk_draw_layout_with_colors(m_gdkwindow, m_textGC, x+minX, y+minY,
case wxNO_OP: mode = GDK_NOOP; break;
case wxSRC_INVERT: mode = GDK_COPY_INVERT; break;
case wxNOR: mode = GDK_NOR; break;
case wxNO_OP: mode = GDK_NOOP; break;
case wxSRC_INVERT: mode = GDK_COPY_INVERT; break;
case wxNOR: mode = GDK_NOR; break;
SetDeviceOrigin(ptOrigin.x, ptOrigin.y);
wxSize size = win->GetClientSize();
DoSetClippingRegion(0, 0, size.x, size.y);
SetDeviceOrigin(ptOrigin.x, ptOrigin.y);
wxSize size = win->GetClientSize();
DoSetClippingRegion(0, 0, size.x, size.y);
gdk_gc_set_clip_region( m_textGC, region );
gdk_gc_set_clip_region( m_bgGC, region );
}
gdk_gc_set_clip_region( m_textGC, region );
gdk_gc_set_clip_region( m_bgGC, region );
}