mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-04 09:11:33 +02:00
* get the size of a bitmap
This commit is contained in:
parent
df909d84d7
commit
9447bce6d6
@ -2,7 +2,7 @@
|
||||
* gtk2_bitmap.cpp: GTK2 implementation of the Bitmap class
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2003 VideoLAN
|
||||
* $Id: gtk2_bitmap.cpp,v 1.4 2003/04/13 22:55:15 asmax Exp $
|
||||
* $Id: gtk2_bitmap.cpp,v 1.5 2003/04/14 17:03:41 asmax Exp $
|
||||
*
|
||||
* Authors: Cyril Deguet <asmax@videolan.org>
|
||||
*
|
||||
@ -109,6 +109,9 @@ GTK2Bitmap::GTK2Bitmap( intf_thread_t *p_intf, string FileName, int AColor )
|
||||
// Bmp = gdk_pixbuf_new( GDK_COLORSPACE_RGB, TRUE, 8, 1, 1);
|
||||
Bmp = NULL;
|
||||
}
|
||||
|
||||
Width = gdk_pixbuf_get_width( Bmp );
|
||||
Height = gdk_pixbuf_get_height( Bmp );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
GTK2Bitmap::GTK2Bitmap( intf_thread_t *p_intf, Graphics *from, int x, int y,
|
||||
@ -165,7 +168,8 @@ void GTK2Bitmap::DrawBitmap( int x, int y, int w, int h, int xRef, int yRef,
|
||||
GdkGC *gc = gdk_gc_new( destImg );
|
||||
/*gdk_pixbuf_render_to_drawable( Bmp, destImg, gc, 0, 0, x, y, w, h,
|
||||
GDK_RGB_DITHER_NONE, 0, 0);*/
|
||||
gdk_pixbuf_render_to_drawable( Bmp, destImg, gc, 0, 0, x, y, 50, 50,
|
||||
fprintf(stderr, "draw %d %d %d %d\n", x, y, w, h);
|
||||
gdk_pixbuf_render_to_drawable( Bmp, destImg, gc, 0, 0, x, y, w, h,
|
||||
GDK_RGB_DITHER_NONE, 0, 0);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -2,7 +2,7 @@
|
||||
* gtk2_theme.cpp: GTK2 implementation of the Theme class
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2003 VideoLAN
|
||||
* $Id: gtk2_theme.cpp,v 1.5 2003/04/13 22:55:15 asmax Exp $
|
||||
* $Id: gtk2_theme.cpp,v 1.6 2003/04/14 17:03:42 asmax Exp $
|
||||
*
|
||||
* Authors: Cyril Deguet <asmax@videolan.org>
|
||||
*
|
||||
@ -320,15 +320,15 @@ void GTK2Theme::AddWindow( string name, int x, int y, bool visible,
|
||||
|
||||
GdkWindowAttr attr;
|
||||
attr.event_mask = GDK_ALL_EVENTS_MASK;
|
||||
attr.width = 400;
|
||||
attr.height = 150;
|
||||
attr.width = 0;
|
||||
attr.height = 0;
|
||||
attr.window_type = GDK_WINDOW_CHILD;
|
||||
attr.wclass = GDK_INPUT_OUTPUT;
|
||||
|
||||
gint mask =0;
|
||||
|
||||
// Create the parent window
|
||||
GdkWindow *gwnd = gdk_window_new( ParentWindow, &attr, mask);
|
||||
// Create the window
|
||||
GdkWindow *gwnd = gdk_window_new( ParentWindow, &attr, mask );
|
||||
if( !gwnd )
|
||||
{
|
||||
msg_Err( p_intf, "CreateWindow failed" );
|
||||
|
@ -2,7 +2,7 @@
|
||||
* gtk2_window.cpp: GTK2 implementation of the Window class
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2003 VideoLAN
|
||||
* $Id: gtk2_window.cpp,v 1.5 2003/04/13 22:55:15 asmax Exp $
|
||||
* $Id: gtk2_window.cpp,v 1.6 2003/04/14 17:03:42 asmax Exp $
|
||||
*
|
||||
* Authors: Cyril Deguet <asmax@videolan.org>
|
||||
*
|
||||
@ -271,10 +271,10 @@ void GTK2Window::Move( int left, int top )
|
||||
//---------------------------------------------------------------------------
|
||||
void GTK2Window::Size( int width, int height )
|
||||
{
|
||||
fprintf(stderr, "size %d %d\n", width, height);
|
||||
Width = width;
|
||||
Height = height;
|
||||
/* SetWindowPos( hWnd, HWND_TOP, Left, Top, Width, Height,
|
||||
SWP_NOMOVE|SWP_NOREDRAW|SWP_NOZORDER );*/
|
||||
gdk_window_resize( gWnd, width, height );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void GTK2Window::ChangeToolTipText( string text )
|
||||
|
Loading…
Reference in New Issue
Block a user