changeset 15723:ac7dcf4a1f8a

draw resize box
author nplourde
date Tue, 14 Jun 2005 12:48:39 +0000
parents b53c4b26dc96
children 35d05a4d14fd
files libvo/vo_quartz.c
diffstat 1 files changed, 36 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_quartz.c	Tue Jun 14 12:41:42 2005 +0000
+++ b/libvo/vo_quartz.c	Tue Jun 14 12:48:39 2005 +0000
@@ -314,7 +314,10 @@
 				
 				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 @@
 		case IMGFMT_RGB32:
 		{
 			CGContextDrawImage (context, bounds, image);
-			CGContextFlush (context);
 		}
 		break;
 			
@@ -922,6 +924,38 @@
 			}
 		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)