[MPlayer-cvslog] CVS: main/libvo vo_quartz.c,1.48,1.49

Nicolas Plourde CVS syncmail at mplayerhq.hu
Tue Jun 14 14:48:42 CEST 2005


CVS change done by Nicolas Plourde CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv28890/libvo

Modified Files:
	vo_quartz.c 
Log Message:
draw resize box

Index: vo_quartz.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_quartz.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- vo_quartz.c	9 Jun 2005 12:39:52 -0000	1.48
+++ vo_quartz.c	14 Jun 2005 12:48:39 -0000	1.49
@@ -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)




More information about the MPlayer-cvslog mailing list