| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- /*
- ** Command & Conquer Generals Zero Hour(tm)
- ** Copyright 2025 Electronic Arts Inc.
- **
- ** This program is free software: you can redistribute it and/or modify
- ** it under the terms of the GNU General Public License as published by
- ** the Free Software Foundation, either version 3 of the License, or
- ** (at your option) any later version.
- **
- ** This program is distributed in the hope that it will be useful,
- ** but WITHOUT ANY WARRANTY; without even the implied warranty of
- ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ** GNU General Public License for more details.
- **
- ** You should have received a copy of the GNU General Public License
- ** along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- ////////////////////////////////////////////////////////////////////////////////
- // //
- // (c) 2001-2003 Electronic Arts Inc. //
- // //
- ////////////////////////////////////////////////////////////////////////////////
- // FILE: .cpp /////////////////////////////////////////////////////////////////
- //-----------------------------------------------------------------------------
- //
- // Westwood Studios Pacific.
- //
- // Confidential Information
- // Copyright (C) 2001 - All Rights Reserved
- //
- //-----------------------------------------------------------------------------
- //
- // Project: RTS3
- //
- // File name: .cpp
- //
- // Created:
- //
- // Desc:
- //
- //-----------------------------------------------------------------------------
- ///////////////////////////////////////////////////////////////////////////////
- // SYSTEM INCLUDES ////////////////////////////////////////////////////////////
- #include <stdlib.h>
- // USER INCLUDES //////////////////////////////////////////////////////////////
- #include "GUIEditDisplay.h"
- #include "EditWindow.h"
- // DEFINES ////////////////////////////////////////////////////////////////////
- // PRIVATE TYPES //////////////////////////////////////////////////////////////
- // PRIVATE DATA ///////////////////////////////////////////////////////////////
- // PUBLIC DATA ////////////////////////////////////////////////////////////////
- // PRIVATE PROTOTYPES /////////////////////////////////////////////////////////
- // PRIVATE FUNCTIONS //////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////////////
- // PUBLIC FUNCTIONS ///////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////////////
- // GUIEditDisplay::GUIEditDisplay =============================================
- /** */
- //=============================================================================
- GUIEditDisplay::GUIEditDisplay( void )
- {
- } // end GUIEditDisplay
- // GUIEditDisplay::~GUIEditDisplay ============================================
- /** */
- //=============================================================================
- GUIEditDisplay::~GUIEditDisplay( void )
- {
- } // end ~GUIEditDisplay
- // GUIEditDisplay::drawLine ===================================================
- /** draw a line on the display in pixel coordinates with the specified color */
- //=============================================================================
- void GUIEditDisplay::drawLine( Int startX, Int startY,
- Int endX, Int endY,
- Real lineWidth, UnsignedInt lineColor )
- {
- TheEditWindow->drawLine( startX, startY, endX, endY, lineWidth, lineColor );
-
- } // end drawLIne
- // GUIEditDisplay::drawOpenRect ===============================================
- /** draw a rect border on the display in pixel coordinates with the
- * specified color */
- //=============================================================================
- void GUIEditDisplay::drawOpenRect( Int startX, Int startY,
- Int width, Int height,
- Real lineWidth, UnsignedInt lineColor )
- {
- TheEditWindow->drawOpenRect( startX, startY, width, height,
- lineWidth, lineColor );
- } // end drawOpenRect
- // GUIEditDisplay::drawFillRect ===============================================
- /** draw a filled rect on the display in pixel coords with the
- * specified color */
- //=============================================================================
- void GUIEditDisplay::drawFillRect( Int startX, Int startY,
- Int width, Int height,
- UnsignedInt color )
- {
- TheEditWindow->drawFillRect( startX, startY,
- width, height,
- color );
- } // end drawFillRect
- // GUIEditDisplay::drawImage ==================================================
- /** draw an image fit within the screen coordinates */
- //=============================================================================
- void GUIEditDisplay::drawImage( const Image *image,
- Int startX, Int startY,
- Int endX, Int endY,
- Color color, DrawImageMode mode )
- {
- TheEditWindow->drawImage( image,
- startX, startY,
- endX, endY,
- color );
- } // end drawImage
- // GUIEditDisplay::setClipRegion ==============================================
- /** sets clipping rectangle for 2D drawing operations */
- //=============================================================================
- void GUIEditDisplay::setClipRegion( IRegion2D *region )
- {
- TheEditWindow->setClipRegion(region);
- }
- // GUIEditDisplay::isClippingEnabled ==============================================
- /** returns current state of 2D image clipping */
- //=============================================================================
- Bool GUIEditDisplay::isClippingEnabled( void )
- {
- return TheEditWindow->isClippingEnabled();
- }
- // GUIEditDisplay::isClippingEnabled ==============================================
- /** returns current state of 2D image clipping */
- //=============================================================================
- void GUIEditDisplay::enableClipping( Bool onoff )
- {
- TheEditWindow->enableClipping(onoff);
- }
|