mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 12:09:36 +00:00
Refactoring. Add line drawing.
This commit is contained in:
@@ -74,19 +74,18 @@ Boolean isToolsOpen;
|
||||
void CreateToolsOffscreen (void)
|
||||
{
|
||||
CGrafPtr wasCPort;
|
||||
GDHandle wasWorld;
|
||||
OSErr theErr;
|
||||
|
||||
if (toolSrcMap == nil)
|
||||
{
|
||||
GetGWorld(&wasCPort, &wasWorld);
|
||||
wasCPort = GetGraphicsPort();
|
||||
|
||||
QSetRect(&toolSrcRect, 0, 0, 360, 216);
|
||||
theErr = CreateOffScreenGWorld(&toolSrcMap, &toolSrcRect, kPreferredDepth);
|
||||
SetGWorld(toolSrcMap, nil);
|
||||
SetGraphicsPort(toolSrcMap);
|
||||
LoadGraphic(kToolsPictID);
|
||||
|
||||
SetGWorld(wasCPort, wasWorld);
|
||||
SetGraphicsPort(wasCPort);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user