salgdi.cxx (51747b8e) | salgdi.cxx (24a22e85) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 1354 unchanged lines hidden (view full) --- 1363{ 1364 static const CGRect aRects[2] = { { {0,0}, { 2, 2 } }, { { 2, 2 }, { 2, 2 } } }; 1365 CGContextAddRects( rContext, aRects, 2 ); 1366 CGContextFillPath( rContext ); 1367} 1368 1369void AquaSalGraphics::Pattern50Fill() 1370{ | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 1354 unchanged lines hidden (view full) --- 1363{ 1364 static const CGRect aRects[2] = { { {0,0}, { 2, 2 } }, { { 2, 2 }, { 2, 2 } } }; 1365 CGContextAddRects( rContext, aRects, 2 ); 1366 CGContextFillPath( rContext ); 1367} 1368 1369void AquaSalGraphics::Pattern50Fill() 1370{ |
1371 static const float aFillCol[4] = { 1,1,1,1 }; | 1371 static const CGFloat aFillCol[4] = { 1,1,1,1 }; |
1372 static const CGPatternCallbacks aCallback = { 0, &DrawPattern50, NULL }; 1373 if( ! GetSalData()->mxP50Space ) 1374 GetSalData()->mxP50Space = CGColorSpaceCreatePattern( GetSalData()->mxRGBSpace ); 1375 if( ! GetSalData()->mxP50Pattern ) 1376 GetSalData()->mxP50Pattern = CGPatternCreate( NULL, CGRectMake( 0, 0, 4, 4 ), 1377 CGAffineTransformIdentity, 4, 4, 1378 kCGPatternTilingConstantSpacing, 1379 false, &aCallback ); --- 7 unchanged lines hidden (view full) --- 1387{ 1388 if ( CheckContext() ) 1389 { 1390 CGRect aCGRect = CGRectMake( nX, nY, nWidth, nHeight); 1391 CGContextSaveGState(mrContext); 1392 1393 if ( nFlags & SAL_INVERT_TRACKFRAME ) 1394 { | 1372 static const CGPatternCallbacks aCallback = { 0, &DrawPattern50, NULL }; 1373 if( ! GetSalData()->mxP50Space ) 1374 GetSalData()->mxP50Space = CGColorSpaceCreatePattern( GetSalData()->mxRGBSpace ); 1375 if( ! GetSalData()->mxP50Pattern ) 1376 GetSalData()->mxP50Pattern = CGPatternCreate( NULL, CGRectMake( 0, 0, 4, 4 ), 1377 CGAffineTransformIdentity, 4, 4, 1378 kCGPatternTilingConstantSpacing, 1379 false, &aCallback ); --- 7 unchanged lines hidden (view full) --- 1387{ 1388 if ( CheckContext() ) 1389 { 1390 CGRect aCGRect = CGRectMake( nX, nY, nWidth, nHeight); 1391 CGContextSaveGState(mrContext); 1392 1393 if ( nFlags & SAL_INVERT_TRACKFRAME ) 1394 { |
1395 const float dashLengths[2] = { 4.0, 4.0 }; // for drawing dashed line | 1395 const CGFloat dashLengths[2] = { 4.0, 4.0 }; // for drawing dashed line |
1396 CGContextSetBlendMode( mrContext, kCGBlendModeDifference ); 1397 CGContextSetRGBStrokeColor ( mrContext, 1.0, 1.0, 1.0, 1.0 ); 1398 CGContextSetLineDash ( mrContext, 0, dashLengths, 2 ); 1399 CGContextSetLineWidth( mrContext, 2.0); 1400 CGContextStrokeRect ( mrContext, aCGRect ); 1401 } 1402 else if ( nFlags & SAL_INVERT_50 ) 1403 { --- 20 unchanged lines hidden (view full) --- 1424 CGPoint* CGpoints ; 1425 if ( CheckContext() ) 1426 { 1427 CGContextSaveGState(mrContext); 1428 CGpoints = makeCGptArray(nPoints,pPtAry); 1429 CGContextAddLines ( mrContext, CGpoints, nPoints ); 1430 if ( nSalFlags & SAL_INVERT_TRACKFRAME ) 1431 { | 1396 CGContextSetBlendMode( mrContext, kCGBlendModeDifference ); 1397 CGContextSetRGBStrokeColor ( mrContext, 1.0, 1.0, 1.0, 1.0 ); 1398 CGContextSetLineDash ( mrContext, 0, dashLengths, 2 ); 1399 CGContextSetLineWidth( mrContext, 2.0); 1400 CGContextStrokeRect ( mrContext, aCGRect ); 1401 } 1402 else if ( nFlags & SAL_INVERT_50 ) 1403 { --- 20 unchanged lines hidden (view full) --- 1424 CGPoint* CGpoints ; 1425 if ( CheckContext() ) 1426 { 1427 CGContextSaveGState(mrContext); 1428 CGpoints = makeCGptArray(nPoints,pPtAry); 1429 CGContextAddLines ( mrContext, CGpoints, nPoints ); 1430 if ( nSalFlags & SAL_INVERT_TRACKFRAME ) 1431 { |
1432 const float dashLengths[2] = { 4.0, 4.0 }; // for drawing dashed line | 1432 const CGFloat dashLengths[2] = { 4.0, 4.0 }; // for drawing dashed line |
1433 CGContextSetBlendMode( mrContext, kCGBlendModeDifference ); 1434 CGContextSetRGBStrokeColor ( mrContext, 1.0, 1.0, 1.0, 1.0 ); 1435 CGContextSetLineDash ( mrContext, 0, dashLengths, 2 ); 1436 CGContextSetLineWidth( mrContext, 2.0); 1437 CGContextStrokePath ( mrContext ); 1438 } 1439 else if ( nSalFlags & SAL_INVERT_50 ) 1440 { --- 1316 unchanged lines hidden --- | 1433 CGContextSetBlendMode( mrContext, kCGBlendModeDifference ); 1434 CGContextSetRGBStrokeColor ( mrContext, 1.0, 1.0, 1.0, 1.0 ); 1435 CGContextSetLineDash ( mrContext, 0, dashLengths, 2 ); 1436 CGContextSetLineWidth( mrContext, 2.0); 1437 CGContextStrokePath ( mrContext ); 1438 } 1439 else if ( nSalFlags & SAL_INVERT_50 ) 1440 { --- 1316 unchanged lines hidden --- |