From fe048bd6ddbb80a9645e1fe2663986a0d47bc1a2 Mon Sep 17 00:00:00 2001 From: nplourde Date: Tue, 14 Jun 2005 12:48:39 +0000 Subject: [PATCH] draw resize box git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15724 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_quartz.c | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/libvo/vo_quartz.c b/libvo/vo_quartz.c index ba3644b185..447c86cc71 100644 --- a/libvo/vo_quartz.c +++ b/libvo/vo_quartz.c @@ -314,7 +314,10 @@ static OSStatus MouseEventHandler(EventHandlerCallRef nextHandler, EventRef even if( (winMousePos.h > (bounds.right - 15)) && (winMousePos.v > (bounds.bottom)) ) { - GrowWindow(theWindow, mousePos, NULL); + if(!vo_quartz_fs) + { + GrowWindow(theWindow, mousePos, NULL); + } } else if(part == inMenuBar) { @@ -895,7 +898,6 @@ static void flip_page(void) case IMGFMT_RGB32: { CGContextDrawImage (context, bounds, image); - CGContextFlush (context); } break; @@ -922,6 +924,38 @@ static void flip_page(void) } break; } + + if(!vo_quartz_fs) + { + //render resize box + CGContextBeginPath(context); + CGContextSetAllowsAntialiasing(context, false); + //CGContextSaveGState(context); + + //line white + CGContextSetRGBStrokeColor (context, 0.2, 0.2, 0.2, 0.5); + CGContextMoveToPoint( context, winRect.right-1, 1); CGContextAddLineToPoint( context, winRect.right-1, 1); + CGContextMoveToPoint( context, winRect.right-1, 5); CGContextAddLineToPoint( context, winRect.right-5, 1); + CGContextMoveToPoint( context, winRect.right-1, 9); CGContextAddLineToPoint( context, winRect.right-9, 1); + CGContextStrokePath( context ); + + //line gray + CGContextSetRGBStrokeColor (context, 0.4, 0.4, 0.4, 0.5); + CGContextMoveToPoint( context, winRect.right-1, 2); CGContextAddLineToPoint( context, winRect.right-2, 1); + CGContextMoveToPoint( context, winRect.right-1, 6); CGContextAddLineToPoint( context, winRect.right-6, 1); + CGContextMoveToPoint( context, winRect.right-1, 10); CGContextAddLineToPoint( context, winRect.right-10, 1); + CGContextStrokePath( context ); + + //line black + CGContextSetRGBStrokeColor (context, 0.6, 0.6, 0.6, 0.5); + CGContextMoveToPoint( context, winRect.right-1, 3); CGContextAddLineToPoint( context, winRect.right-3, 1); + CGContextMoveToPoint( context, winRect.right-1, 7); CGContextAddLineToPoint( context, winRect.right-7, 1); + CGContextMoveToPoint( context, winRect.right-1, 11); CGContextAddLineToPoint( context, winRect.right-11, 1); + CGContextStrokePath( context ); + + //CGContextRestoreGState( context ); + CGContextFlush (context); + } } static uint32_t draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y)