1*9f62ea84SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*9f62ea84SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*9f62ea84SAndrew Rist * or more contributor license agreements. See the NOTICE file
5*9f62ea84SAndrew Rist * distributed with this work for additional information
6*9f62ea84SAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*9f62ea84SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*9f62ea84SAndrew Rist * "License"); you may not use this file except in compliance
9*9f62ea84SAndrew Rist * with the License. You may obtain a copy of the License at
10cdf0e10cSrcweir *
11*9f62ea84SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
13*9f62ea84SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*9f62ea84SAndrew Rist * software distributed under the License is distributed on an
15*9f62ea84SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*9f62ea84SAndrew Rist * KIND, either express or implied. See the License for the
17*9f62ea84SAndrew Rist * specific language governing permissions and limitations
18*9f62ea84SAndrew Rist * under the License.
19cdf0e10cSrcweir *
20*9f62ea84SAndrew Rist *************************************************************/
21*9f62ea84SAndrew Rist
22*9f62ea84SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir #include <sal/main.h>
25cdf0e10cSrcweir #include <tools/extendapplicationenvironment.hxx>
26cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp>
27cdf0e10cSrcweir
28cdf0e10cSrcweir #include <vcl/event.hxx>
29cdf0e10cSrcweir #include <vcl/svapp.hxx>
30cdf0e10cSrcweir #include <vcl/wrkwin.hxx>
31cdf0e10cSrcweir #include <vcl/gradient.hxx>
32cdf0e10cSrcweir #include <vcl/lineinfo.hxx>
33cdf0e10cSrcweir #include <vcl/bitmap.hxx>
34cdf0e10cSrcweir #include <vcl/bmpacc.hxx>
35cdf0e10cSrcweir #include <vcl/metric.hxx>
36cdf0e10cSrcweir
37cdf0e10cSrcweir #include <rtl/ustrbuf.hxx>
38cdf0e10cSrcweir
39cdf0e10cSrcweir #include <math.h>
40cdf0e10cSrcweir
41cdf0e10cSrcweir #include <comphelper/processfactory.hxx>
42cdf0e10cSrcweir #include <cppuhelper/servicefactory.hxx>
43cdf0e10cSrcweir #include <cppuhelper/bootstrap.hxx>
44cdf0e10cSrcweir
45cdf0e10cSrcweir using namespace rtl;
46cdf0e10cSrcweir using namespace ::com::sun::star::uno;
47cdf0e10cSrcweir using namespace ::com::sun::star::lang;
48cdf0e10cSrcweir // -----------------------------------------------------------------------
49cdf0e10cSrcweir
50cdf0e10cSrcweir // Forward declaration
51cdf0e10cSrcweir void Main();
52cdf0e10cSrcweir
53cdf0e10cSrcweir // -----------------------------------------------------------------------
54cdf0e10cSrcweir
SAL_IMPLEMENT_MAIN()55cdf0e10cSrcweir SAL_IMPLEMENT_MAIN()
56cdf0e10cSrcweir {
57cdf0e10cSrcweir tools::extendApplicationEnvironment();
58cdf0e10cSrcweir
59cdf0e10cSrcweir Reference< XMultiServiceFactory > xMS;
60cdf0e10cSrcweir xMS = cppu::createRegistryServiceFactory( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "types.rdb" ) ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "applicat.rdb" ) ), sal_True );
61cdf0e10cSrcweir
62cdf0e10cSrcweir InitVCL( xMS );
63cdf0e10cSrcweir ::Main();
64cdf0e10cSrcweir DeInitVCL();
65cdf0e10cSrcweir
66cdf0e10cSrcweir return 0;
67cdf0e10cSrcweir }
68cdf0e10cSrcweir
69cdf0e10cSrcweir // -----------------------------------------------------------------------
70cdf0e10cSrcweir
71cdf0e10cSrcweir class MyWin : public WorkWindow
72cdf0e10cSrcweir {
73cdf0e10cSrcweir Bitmap m_aBitmap;
74cdf0e10cSrcweir public:
75cdf0e10cSrcweir MyWin( Window* pParent, WinBits nWinStyle );
76cdf0e10cSrcweir
77cdf0e10cSrcweir void MouseMove( const MouseEvent& rMEvt );
78cdf0e10cSrcweir void MouseButtonDown( const MouseEvent& rMEvt );
79cdf0e10cSrcweir void MouseButtonUp( const MouseEvent& rMEvt );
80cdf0e10cSrcweir void KeyInput( const KeyEvent& rKEvt );
81cdf0e10cSrcweir void KeyUp( const KeyEvent& rKEvt );
82cdf0e10cSrcweir void Paint( const Rectangle& rRect );
83cdf0e10cSrcweir void Resize();
84cdf0e10cSrcweir };
85cdf0e10cSrcweir
86cdf0e10cSrcweir // -----------------------------------------------------------------------
87cdf0e10cSrcweir
Main()88cdf0e10cSrcweir void Main()
89cdf0e10cSrcweir {
90cdf0e10cSrcweir MyWin aMainWin( NULL, WB_APP | WB_STDWORK );
91cdf0e10cSrcweir aMainWin.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "VCL - Workbench" ) ) );
92cdf0e10cSrcweir aMainWin.Show();
93cdf0e10cSrcweir
94cdf0e10cSrcweir Application::Execute();
95cdf0e10cSrcweir }
96cdf0e10cSrcweir
97cdf0e10cSrcweir // -----------------------------------------------------------------------
98cdf0e10cSrcweir
MyWin(Window * pParent,WinBits nWinStyle)99cdf0e10cSrcweir MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
100cdf0e10cSrcweir WorkWindow( pParent, nWinStyle ),
101cdf0e10cSrcweir m_aBitmap( Size( 256, 256 ), 32 )
102cdf0e10cSrcweir {
103cdf0e10cSrcweir // prepare an alpha mask
104cdf0e10cSrcweir BitmapWriteAccess* pAcc = m_aBitmap.AcquireWriteAccess();
105cdf0e10cSrcweir for( int nX = 0; nX < 256; nX++ )
106cdf0e10cSrcweir {
107cdf0e10cSrcweir for( int nY = 0; nY < 256; nY++ )
108cdf0e10cSrcweir {
109cdf0e10cSrcweir double fRed = 255.0-1.5*sqrt((double)(nX*nX+nY*nY));
110cdf0e10cSrcweir if( fRed < 0.0 )
111cdf0e10cSrcweir fRed = 0.0;
112cdf0e10cSrcweir double fGreen = 255.0-1.5*sqrt((double)(((255-nX)*(255-nX)+nY*nY)));
113cdf0e10cSrcweir if( fGreen < 0.0 )
114cdf0e10cSrcweir fGreen = 0.0;
115cdf0e10cSrcweir double fBlue = 255.0-1.5*sqrt((double)((128-nX)*(128-nX)+(255-nY)*(255-nY)));
116cdf0e10cSrcweir if( fBlue < 0.0 )
117cdf0e10cSrcweir fBlue = 0.0;
118cdf0e10cSrcweir pAcc->SetPixel( nX, nY, BitmapColor( sal_uInt8(fRed), sal_uInt8(fGreen), sal_uInt8(fBlue) ) );
119cdf0e10cSrcweir }
120cdf0e10cSrcweir }
121cdf0e10cSrcweir m_aBitmap.ReleaseAccess( pAcc );
122cdf0e10cSrcweir }
123cdf0e10cSrcweir
124cdf0e10cSrcweir // -----------------------------------------------------------------------
125cdf0e10cSrcweir
MouseMove(const MouseEvent & rMEvt)126cdf0e10cSrcweir void MyWin::MouseMove( const MouseEvent& rMEvt )
127cdf0e10cSrcweir {
128cdf0e10cSrcweir WorkWindow::MouseMove( rMEvt );
129cdf0e10cSrcweir }
130cdf0e10cSrcweir
131cdf0e10cSrcweir // -----------------------------------------------------------------------
132cdf0e10cSrcweir
MouseButtonDown(const MouseEvent & rMEvt)133cdf0e10cSrcweir void MyWin::MouseButtonDown( const MouseEvent& rMEvt )
134cdf0e10cSrcweir {
135cdf0e10cSrcweir WorkWindow::MouseButtonDown( rMEvt );
136cdf0e10cSrcweir }
137cdf0e10cSrcweir
138cdf0e10cSrcweir // -----------------------------------------------------------------------
139cdf0e10cSrcweir
MouseButtonUp(const MouseEvent & rMEvt)140cdf0e10cSrcweir void MyWin::MouseButtonUp( const MouseEvent& rMEvt )
141cdf0e10cSrcweir {
142cdf0e10cSrcweir WorkWindow::MouseButtonUp( rMEvt );
143cdf0e10cSrcweir }
144cdf0e10cSrcweir
145cdf0e10cSrcweir // -----------------------------------------------------------------------
146cdf0e10cSrcweir
KeyInput(const KeyEvent & rKEvt)147cdf0e10cSrcweir void MyWin::KeyInput( const KeyEvent& rKEvt )
148cdf0e10cSrcweir {
149cdf0e10cSrcweir WorkWindow::KeyInput( rKEvt );
150cdf0e10cSrcweir }
151cdf0e10cSrcweir
152cdf0e10cSrcweir // -----------------------------------------------------------------------
153cdf0e10cSrcweir
KeyUp(const KeyEvent & rKEvt)154cdf0e10cSrcweir void MyWin::KeyUp( const KeyEvent& rKEvt )
155cdf0e10cSrcweir {
156cdf0e10cSrcweir WorkWindow::KeyUp( rKEvt );
157cdf0e10cSrcweir }
158cdf0e10cSrcweir
159cdf0e10cSrcweir // -----------------------------------------------------------------------
160cdf0e10cSrcweir
project(const Point & rPoint)161cdf0e10cSrcweir static Point project( const Point& rPoint )
162cdf0e10cSrcweir {
163cdf0e10cSrcweir const double angle_x = M_PI / 6.0;
164cdf0e10cSrcweir const double angle_z = M_PI / 6.0;
165cdf0e10cSrcweir
166cdf0e10cSrcweir // transform planar coordinates to 3d
167cdf0e10cSrcweir double x = rPoint.X();
168cdf0e10cSrcweir double y = rPoint.Y();
169cdf0e10cSrcweir //double z = 0;
170cdf0e10cSrcweir
171cdf0e10cSrcweir // rotate around X axis
172cdf0e10cSrcweir double x1 = x;
173cdf0e10cSrcweir double y1 = y * cos( angle_x );
174cdf0e10cSrcweir double z1 = y * sin( angle_x );
175cdf0e10cSrcweir
176cdf0e10cSrcweir // rotate around Z axis
177cdf0e10cSrcweir double x2 = x1 * cos( angle_z ) + y1 * sin( angle_z );
178cdf0e10cSrcweir //double y2 = y1 * cos( angle_z ) - x1 * sin( angle_z );
179cdf0e10cSrcweir double z2 = z1;
180cdf0e10cSrcweir
181cdf0e10cSrcweir return Point( (sal_Int32)x2, (sal_Int32)z2 );
182cdf0e10cSrcweir }
183cdf0e10cSrcweir
approachColor(const Color & rFrom,const Color & rTo)184cdf0e10cSrcweir static Color approachColor( const Color& rFrom, const Color& rTo )
185cdf0e10cSrcweir {
186cdf0e10cSrcweir Color aColor;
187cdf0e10cSrcweir sal_uInt8 nDiff;
188cdf0e10cSrcweir // approach red
189cdf0e10cSrcweir if( rFrom.GetRed() < rTo.GetRed() )
190cdf0e10cSrcweir {
191cdf0e10cSrcweir nDiff = rTo.GetRed() - rFrom.GetRed();
192cdf0e10cSrcweir aColor.SetRed( rFrom.GetRed() + ( nDiff < 10 ? nDiff : 10 ) );
193cdf0e10cSrcweir }
194cdf0e10cSrcweir else if( rFrom.GetRed() > rTo.GetRed() )
195cdf0e10cSrcweir {
196cdf0e10cSrcweir nDiff = rFrom.GetRed() - rTo.GetRed();
197cdf0e10cSrcweir aColor.SetRed( rFrom.GetRed() - ( nDiff < 10 ? nDiff : 10 ) );
198cdf0e10cSrcweir }
199cdf0e10cSrcweir else
200cdf0e10cSrcweir aColor.SetRed( rFrom.GetRed() );
201cdf0e10cSrcweir
202cdf0e10cSrcweir // approach Green
203cdf0e10cSrcweir if( rFrom.GetGreen() < rTo.GetGreen() )
204cdf0e10cSrcweir {
205cdf0e10cSrcweir nDiff = rTo.GetGreen() - rFrom.GetGreen();
206cdf0e10cSrcweir aColor.SetGreen( rFrom.GetGreen() + ( nDiff < 10 ? nDiff : 10 ) );
207cdf0e10cSrcweir }
208cdf0e10cSrcweir else if( rFrom.GetGreen() > rTo.GetGreen() )
209cdf0e10cSrcweir {
210cdf0e10cSrcweir nDiff = rFrom.GetGreen() - rTo.GetGreen();
211cdf0e10cSrcweir aColor.SetGreen( rFrom.GetGreen() - ( nDiff < 10 ? nDiff : 10 ) );
212cdf0e10cSrcweir }
213cdf0e10cSrcweir else
214cdf0e10cSrcweir aColor.SetGreen( rFrom.GetGreen() );
215cdf0e10cSrcweir
216cdf0e10cSrcweir // approach blue
217cdf0e10cSrcweir if( rFrom.GetBlue() < rTo.GetBlue() )
218cdf0e10cSrcweir {
219cdf0e10cSrcweir nDiff = rTo.GetBlue() - rFrom.GetBlue();
220cdf0e10cSrcweir aColor.SetBlue( rFrom.GetBlue() + ( nDiff < 10 ? nDiff : 10 ) );
221cdf0e10cSrcweir }
222cdf0e10cSrcweir else if( rFrom.GetBlue() > rTo.GetBlue() )
223cdf0e10cSrcweir {
224cdf0e10cSrcweir nDiff = rFrom.GetBlue() - rTo.GetBlue();
225cdf0e10cSrcweir aColor.SetBlue( rFrom.GetBlue() - ( nDiff < 10 ? nDiff : 10 ) );
226cdf0e10cSrcweir }
227cdf0e10cSrcweir else
228cdf0e10cSrcweir aColor.SetBlue( rFrom.GetBlue() );
229cdf0e10cSrcweir
230cdf0e10cSrcweir return aColor;
231cdf0e10cSrcweir }
232cdf0e10cSrcweir
233cdf0e10cSrcweir #define DELTA 5.0
Paint(const Rectangle & rRect)234cdf0e10cSrcweir void MyWin::Paint( const Rectangle& rRect )
235cdf0e10cSrcweir {
236cdf0e10cSrcweir WorkWindow::Paint( rRect );
237cdf0e10cSrcweir
238cdf0e10cSrcweir Push( PUSH_ALL );
239cdf0e10cSrcweir MapMode aMapMode( MAP_100TH_MM );
240cdf0e10cSrcweir
241cdf0e10cSrcweir SetMapMode( aMapMode );
242cdf0e10cSrcweir
243cdf0e10cSrcweir Size aPaperSize = GetOutputSize();
244cdf0e10cSrcweir Point aCenter( aPaperSize.Width()/2-300,
245cdf0e10cSrcweir (aPaperSize.Height() - 8400)/2 + 8400 );
246cdf0e10cSrcweir Point aP1( aPaperSize.Width()/48, 0), aP2( aPaperSize.Width()/40, 0 ), aPoint;
247cdf0e10cSrcweir
248cdf0e10cSrcweir DrawRect( Rectangle( Point( 0,0 ), aPaperSize ) );
249cdf0e10cSrcweir DrawRect( Rectangle( Point( 100,100 ),
250cdf0e10cSrcweir Size( aPaperSize.Width()-200,
251cdf0e10cSrcweir aPaperSize.Height()-200 ) ) );
252cdf0e10cSrcweir DrawRect( Rectangle( Point( 200,200 ),
253cdf0e10cSrcweir Size( aPaperSize.Width()-400,
254cdf0e10cSrcweir aPaperSize.Height()-400 ) ) );
255cdf0e10cSrcweir DrawRect( Rectangle( Point( 300,300 ),
256cdf0e10cSrcweir Size( aPaperSize.Width()-600,
257cdf0e10cSrcweir aPaperSize.Height()-600 ) ) );
258cdf0e10cSrcweir
259cdf0e10cSrcweir // AllSettings aSettings( Application::GetSettings() );
260cdf0e10cSrcweir
261cdf0e10cSrcweir const int nFontCount = GetDevFontCount();
262cdf0e10cSrcweir const int nFontSamples = (nFontCount<15) ? nFontCount : 15;
263cdf0e10cSrcweir for( int i = 0; i < nFontSamples; ++i )
264cdf0e10cSrcweir {
265cdf0e10cSrcweir #if 0
266cdf0e10cSrcweir Font aFont( GetFont() );
267cdf0e10cSrcweir aFont.SetName( String( RTL_CONSTASCII_USTRINGPARAM( "Courier" ) ) );
268cdf0e10cSrcweir aFont.SetWeight( WEIGHT_NORMAL );
269cdf0e10cSrcweir aFont.SetItalic( ITALIC_NONE );
270cdf0e10cSrcweir #else
271cdf0e10cSrcweir FontInfo aFont = GetDevFont( (i*nFontCount) / nFontSamples );
272cdf0e10cSrcweir aFont.SetHeight( 400 + (i%7) * 100 );
273cdf0e10cSrcweir aFont.SetOrientation( i * (3600 / nFontSamples) );
274cdf0e10cSrcweir #endif
275cdf0e10cSrcweir SetFont( aFont );
276cdf0e10cSrcweir
277cdf0e10cSrcweir sal_uInt8 nRed = (i << 6) & 0xC0;
278cdf0e10cSrcweir sal_uInt8 nGreen = (i << 4) & 0xC0;
279cdf0e10cSrcweir sal_uInt8 nBlue = (i << 2) & 0xC0;
280cdf0e10cSrcweir SetTextColor( Color( nRed, nGreen, nBlue ) );
281cdf0e10cSrcweir
282cdf0e10cSrcweir OUStringBuffer aPrintText(1024);
283cdf0e10cSrcweir long nMaxWidth = 0;
284cdf0e10cSrcweir
285cdf0e10cSrcweir aPrintText.appendAscii( "SVP test program" );
286cdf0e10cSrcweir
287cdf0e10cSrcweir DrawText( Rectangle( Point( (aPaperSize.Width() - 4000) / 2, 2000 ),
288cdf0e10cSrcweir Size( aPaperSize.Width() - 2100 - nMaxWidth,
289cdf0e10cSrcweir aPaperSize.Height() - 4000 ) ),
290cdf0e10cSrcweir aPrintText.makeStringAndClear(),
291cdf0e10cSrcweir TEXT_DRAW_MULTILINE );
292cdf0e10cSrcweir }
293cdf0e10cSrcweir
294cdf0e10cSrcweir SetFillColor();
295cdf0e10cSrcweir DrawRect( Rectangle( Point( aPaperSize.Width() - 4000, 1000 ),
296cdf0e10cSrcweir Size( 3000,3000 ) ) );
297cdf0e10cSrcweir DrawBitmap( Point( aPaperSize.Width() - 4000, 1000 ),
298cdf0e10cSrcweir Size( 3000,3000 ),
299cdf0e10cSrcweir m_aBitmap );
300cdf0e10cSrcweir
301cdf0e10cSrcweir Color aWhite( 0xff, 0xff, 0xff );
302cdf0e10cSrcweir Color aBlack( 0, 0, 0 );
303cdf0e10cSrcweir Color aLightRed( 0xff, 0, 0 );
304cdf0e10cSrcweir Color aDarkRed( 0x40, 0, 0 );
305cdf0e10cSrcweir Color aLightBlue( 0, 0, 0xff );
306cdf0e10cSrcweir Color aDarkBlue( 0,0,0x40 );
307cdf0e10cSrcweir Color aLightGreen( 0, 0xff, 0 );
308cdf0e10cSrcweir Color aDarkGreen( 0, 0x40, 0 );
309cdf0e10cSrcweir
310cdf0e10cSrcweir Gradient aGradient( GRADIENT_LINEAR, aBlack, aWhite );
311cdf0e10cSrcweir aGradient.SetAngle( 900 );
312cdf0e10cSrcweir DrawGradient( Rectangle( Point( 1000, 4500 ),
313cdf0e10cSrcweir Size( aPaperSize.Width() - 2000,
314cdf0e10cSrcweir 500 ) ), aGradient );
315cdf0e10cSrcweir aGradient.SetStartColor( aDarkRed );
316cdf0e10cSrcweir aGradient.SetEndColor( aLightBlue );
317cdf0e10cSrcweir DrawGradient( Rectangle( Point( 1000, 5300 ),
318cdf0e10cSrcweir Size( aPaperSize.Width() - 2000,
319cdf0e10cSrcweir 500 ) ), aGradient );
320cdf0e10cSrcweir aGradient.SetStartColor( aDarkBlue );
321cdf0e10cSrcweir aGradient.SetEndColor( aLightGreen );
322cdf0e10cSrcweir DrawGradient( Rectangle( Point( 1000, 6100 ),
323cdf0e10cSrcweir Size( aPaperSize.Width() - 2000,
324cdf0e10cSrcweir 500 ) ), aGradient );
325cdf0e10cSrcweir aGradient.SetStartColor( aDarkGreen );
326cdf0e10cSrcweir aGradient.SetEndColor( aLightRed );
327cdf0e10cSrcweir DrawGradient( Rectangle( Point( 1000, 6900 ),
328cdf0e10cSrcweir Size( aPaperSize.Width() - 2000,
329cdf0e10cSrcweir 500 ) ), aGradient );
330cdf0e10cSrcweir
331cdf0e10cSrcweir
332cdf0e10cSrcweir
333cdf0e10cSrcweir LineInfo aLineInfo( LINE_SOLID, 200 );
334cdf0e10cSrcweir double sind = sin( DELTA*M_PI/180.0 );
335cdf0e10cSrcweir double cosd = cos( DELTA*M_PI/180.0 );
336cdf0e10cSrcweir double factor = 1 + (DELTA/1000.0);
337cdf0e10cSrcweir int n=0;
338cdf0e10cSrcweir Color aLineColor( 0, 0, 0 );
339cdf0e10cSrcweir Color aApproachColor( 0, 0, 200 );
340cdf0e10cSrcweir while ( aP2.X() < aCenter.X() && n++ < 680 )
341cdf0e10cSrcweir {
342cdf0e10cSrcweir aLineInfo.SetWidth( n/3 );
343cdf0e10cSrcweir aLineColor = approachColor( aLineColor, aApproachColor );
344cdf0e10cSrcweir SetLineColor( aLineColor );
345cdf0e10cSrcweir
346cdf0e10cSrcweir // switch aproach color
347cdf0e10cSrcweir if( aApproachColor.IsRGBEqual( aLineColor ) )
348cdf0e10cSrcweir {
349cdf0e10cSrcweir if( aApproachColor.GetRed() )
350cdf0e10cSrcweir aApproachColor = Color( 0, 0, 200 );
351cdf0e10cSrcweir else if( aApproachColor.GetGreen() )
352cdf0e10cSrcweir aApproachColor = Color( 200, 0, 0 );
353cdf0e10cSrcweir else
354cdf0e10cSrcweir aApproachColor = Color( 0, 200, 0 );
355cdf0e10cSrcweir }
356cdf0e10cSrcweir
357cdf0e10cSrcweir DrawLine( project( aP1 ) + aCenter,
358cdf0e10cSrcweir project( aP2 ) + aCenter,
359cdf0e10cSrcweir aLineInfo );
360cdf0e10cSrcweir aPoint.X() = (int)((((double)aP1.X())*cosd - ((double)aP1.Y())*sind)*factor);
361cdf0e10cSrcweir aPoint.Y() = (int)((((double)aP1.Y())*cosd + ((double)aP1.X())*sind)*factor);
362cdf0e10cSrcweir aP1 = aPoint;
363cdf0e10cSrcweir aPoint.X() = (int)((((double)aP2.X())*cosd - ((double)aP2.Y())*sind)*factor);
364cdf0e10cSrcweir aPoint.Y() = (int)((((double)aP2.Y())*cosd + ((double)aP2.X())*sind)*factor);
365cdf0e10cSrcweir aP2 = aPoint;
366cdf0e10cSrcweir }
367cdf0e10cSrcweir Pop();
368cdf0e10cSrcweir }
369cdf0e10cSrcweir
370cdf0e10cSrcweir // -----------------------------------------------------------------------
371cdf0e10cSrcweir
Resize()372cdf0e10cSrcweir void MyWin::Resize()
373cdf0e10cSrcweir {
374cdf0e10cSrcweir WorkWindow::Resize();
375cdf0e10cSrcweir }
376