From 4af909c207cac35c27256005e1f525e0b29ff7ad Mon Sep 17 00:00:00 2001 From: ceylo Date: Sun, 14 Jun 2009 14:36:11 +0000 Subject: [PATCH 1/6] Fixed issue with beep produced by Esc and functions keys. git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1142 4e206d99-4929-0410-ac5d-dfc041789085 --- src/SFML/Window/Cocoa/GLKit.mm | 9 ++++-- src/SFML/Window/Cocoa/WindowImplCocoa.hpp | 4 +++ src/SFML/Window/Cocoa/WindowImplCocoa.mm | 38 +++++++++++------------ 3 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/SFML/Window/Cocoa/GLKit.mm b/src/SFML/Window/Cocoa/GLKit.mm index a570f44b..08215f72 100644 --- a/src/SFML/Window/Cocoa/GLKit.mm +++ b/src/SFML/Window/Cocoa/GLKit.mm @@ -287,9 +287,12 @@ static GLContext *sharedCtx = nil; { assert(myDelegate != NULL); - NSText *field = [[self window] fieldEditor:YES forObject:nil]; - [field interpretKeyEvents:[NSArray arrayWithObject:theEvent]]; - [field setString:@""]; + if (sf::priv::WindowImplCocoa::IsTextEvent((void *)theEvent)) + { + NSText *field = [[self window] fieldEditor:YES forObject:nil]; + [field interpretKeyEvents:[NSArray arrayWithObject:theEvent]]; + [field setString:@""]; + } myDelegate->HandleKeyDown(theEvent); } diff --git a/src/SFML/Window/Cocoa/WindowImplCocoa.hpp b/src/SFML/Window/Cocoa/WindowImplCocoa.hpp index bc93d54c..23ca1397 100644 --- a/src/SFML/Window/Cocoa/WindowImplCocoa.hpp +++ b/src/SFML/Window/Cocoa/WindowImplCocoa.hpp @@ -108,6 +108,10 @@ public : void HandleMouseMove(void *eventRef); void HandleMouseWheel(void *eventRef); + //////////////////////////////////////////////////////////// + /// Return whether 'ev' must be considered as a TextEntered event + //////////////////////////////////////////////////////////// + static bool IsTextEvent(void *event); private : //////////////////////////////////////////////////////////// diff --git a/src/SFML/Window/Cocoa/WindowImplCocoa.mm b/src/SFML/Window/Cocoa/WindowImplCocoa.mm index 3b66bbcc..4f905535 100644 --- a/src/SFML/Window/Cocoa/WindowImplCocoa.mm +++ b/src/SFML/Window/Cocoa/WindowImplCocoa.mm @@ -511,6 +511,25 @@ void WindowImplCocoa::HandleMouseWheel(void *eventRef) } } +//////////////////////////////////////////////////////////// +/// Return whether 'ev' must be considered as a TextEntered event +//////////////////////////////////////////////////////////// +bool WindowImplCocoa::IsTextEvent(void *eventRef) +{ + NSEvent *event = (NSEvent *)eventRef; + bool res = false; + + if (event && [event type] == NSKeyDown && [[event characters] length]) { + unichar code = [[event characters] characterAtIndex:0]; + + // Codes from 0xF700 to 0xF8FF are non text keys (see NSEvent.h) + // 0x35 is the Escape key + if ([event keyCode] != 0x35 && (code < 0xF700 || code > 0xF8FF)) + res = true; + } + + return res; +} //////////////////////////////////////////////////////////// /// /see sfWindowImpl::Display @@ -797,25 +816,6 @@ static Key::Code KeyForUnicode(unsigned short uniCode) } -//////////////////////////////////////////////////////////// -/// Return whether 'ev' must be considered as a TextEntered event -//////////////////////////////////////////////////////////// -static bool IsTextEvent(NSEvent *event) -{ - bool res = false; - - if (event && [event type] == NSKeyDown && [[event characters] length]) { - unichar code = [[event characters] characterAtIndex:0]; - - // Codes from 0xF700 to 0xF8FF are non text keys (see NSEvent.h) - if (code < 0xF700 || code > 0xF8FF) - res = true; - } - - return res; -} - - } // namespace priv } // namespace sf From 1e8cb5827d57ecfe18bf5c341b92d60e98c5637c Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Tue, 16 Jun 2009 20:17:56 +0000 Subject: [PATCH 2/6] Minor updates to VC2008 project files Better preprocessor detection of FreeBSD OS Improved the Qt sample git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1143 4e206d99-4929-0410-ac5d-dfc041789085 --- build/vc2008/SFML.sln | 26 ++++++++++++++++- build/vc2008/sfml-audio.vcproj | 2 +- include/SFML/Config.hpp | 2 +- samples/build/vc2008/ftp.vcproj | 4 +-- samples/build/vc2008/opengl.vcproj | 4 +-- samples/build/vc2008/pong.vcproj | 4 +-- samples/build/vc2008/postfx.vcproj | 4 +-- samples/build/vc2008/qt.vcproj | 4 +-- samples/build/vc2008/sockets.vcproj | 4 +-- samples/build/vc2008/sound-capture.vcproj | 4 +-- samples/build/vc2008/sound.vcproj | 4 +-- samples/build/vc2008/voip.vcproj | 4 +-- samples/build/vc2008/win32.vcproj | 4 +-- samples/build/vc2008/window.vcproj | 4 +-- samples/build/vc2008/wxwidgets.vcproj | 4 +-- samples/qt/Main.cpp | 34 ++++++++++++++--------- samples/qt/QSFMLCanvas.cpp | 26 ++++++++--------- samples/qt/QSFMLCanvas.hpp | 23 +++++++-------- samples/wxwidgets/Main.cpp | 7 +---- 19 files changed, 98 insertions(+), 70 deletions(-) diff --git a/build/vc2008/SFML.sln b/build/vc2008/SFML.sln index 5831fd3a..58c8d657 100644 --- a/build/vc2008/SFML.sln +++ b/build/vc2008/SFML.sln @@ -1,6 +1,6 @@  Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 +# Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sfml-audio", "sfml-audio.vcproj", "{B1BDA469-E6A7-4AF7-BDF9-EDDD7AD979A2}" ProjectSection(ProjectDependencies) = postProject {C061A27D-7CA0-4179-9869-672FA04A86A8} = {C061A27D-7CA0-4179-9869-672FA04A86A8} @@ -108,6 +108,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxwidgets", "..\..\samples\ {0F9CE5F0-4D89-4314-9147-8AAB1B8842ED} = {0F9CE5F0-4D89-4314-9147-8AAB1B8842ED} EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{4E210688-F375-4A1B-8422-402081DAA460}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SFML", "SFML", "{5DDF255F-A4D9-4E41-9315-3FB69F8021E4}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug DLL|Win32 = Debug DLL|Win32 @@ -338,4 +342,24 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {7236920B-254C-43A3-9DC1-778B477226DF} = {4E210688-F375-4A1B-8422-402081DAA460} + {EAB1A0A4-8CCC-4A74-B3B5-9F60243581D2} = {4E210688-F375-4A1B-8422-402081DAA460} + {4CD9A872-16EF-4C53-81FC-C7E77E782718} = {4E210688-F375-4A1B-8422-402081DAA460} + {DDDE27DC-5568-43EE-BD0E-57C581F73EDE} = {4E210688-F375-4A1B-8422-402081DAA460} + {E8B7727D-2308-4ADC-90AE-D3F46798447D} = {4E210688-F375-4A1B-8422-402081DAA460} + {E6ED898F-218E-4467-8B1D-92E393283E1B} = {4E210688-F375-4A1B-8422-402081DAA460} + {8B3B274A-B3B7-4C6B-8D4A-5334E2116830} = {4E210688-F375-4A1B-8422-402081DAA460} + {11E3764D-850E-4EDA-9823-F66383A11042} = {4E210688-F375-4A1B-8422-402081DAA460} + {34EBDA13-AFA3-4AD9-AB64-2B2D40E09573} = {4E210688-F375-4A1B-8422-402081DAA460} + {4B169017-FFDD-4588-9658-6F1C9ABC6495} = {4E210688-F375-4A1B-8422-402081DAA460} + {303EC049-639D-4F9C-9F33-D4B7F702275B} = {4E210688-F375-4A1B-8422-402081DAA460} + {11E9ABEF-17A5-4FF7-91E5-994F34172F68} = {4E210688-F375-4A1B-8422-402081DAA460} + {B1BDA469-E6A7-4AF7-BDF9-EDDD7AD979A2} = {5DDF255F-A4D9-4E41-9315-3FB69F8021E4} + {0F9CE5F0-4D89-4314-9147-8AAB1B8842ED} = {5DDF255F-A4D9-4E41-9315-3FB69F8021E4} + {FA4620B1-393A-4719-9BB4-3BC8CAA70C4B} = {5DDF255F-A4D9-4E41-9315-3FB69F8021E4} + {2BD26A09-E1B6-42E2-A0D0-63987B76BB97} = {5DDF255F-A4D9-4E41-9315-3FB69F8021E4} + {823DDC98-42D5-4A38-88CF-9DC06C788AE4} = {5DDF255F-A4D9-4E41-9315-3FB69F8021E4} + {C061A27D-7CA0-4179-9869-672FA04A86A8} = {5DDF255F-A4D9-4E41-9315-3FB69F8021E4} + EndGlobalSection EndGlobal diff --git a/build/vc2008/sfml-audio.vcproj b/build/vc2008/sfml-audio.vcproj index ffad02ee..0260f5be 100644 --- a/build/vc2008/sfml-audio.vcproj +++ b/build/vc2008/sfml-audio.vcproj @@ -406,7 +406,7 @@ > @@ -129,7 +129,7 @@ RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="3" - Detect64BitPortabilityProblems="true" + Detect64BitPortabilityProblems="false" DebugInformationFormat="0" DisableSpecificWarnings="4311;4312" /> diff --git a/samples/build/vc2008/sockets.vcproj b/samples/build/vc2008/sockets.vcproj index 9c3f91e7..40487d22 100644 --- a/samples/build/vc2008/sockets.vcproj +++ b/samples/build/vc2008/sockets.vcproj @@ -49,7 +49,7 @@ RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4" - Detect64BitPortabilityProblems="true" + Detect64BitPortabilityProblems="false" DebugInformationFormat="4" /> -#include -#include -#include +#include +#include +#include +#include //////////////////////////////////////////////////////////// @@ -20,8 +20,8 @@ public : /// Construct the canvas /// //////////////////////////////////////////////////////////// - MyCanvas(QWidget* Parent, const QPoint& Position, const QSize& Size) : - QSFMLCanvas(Parent, Position, Size) + MyCanvas(QWidget* Parent = NULL) : + QSFMLCanvas(QSize(100, 100), 0, Parent) { } @@ -54,8 +54,13 @@ private : // Stick the sprite to the mouse cursor if (Event.Type == sf::Event::MouseMoved) { - mySprite.SetX(Event.MouseMove.X); - mySprite.SetY(Event.MouseMove.Y); + mySprite.SetPosition(ConvertCoords(Event.MouseMove.X, Event.MouseMove.Y)); + } + + // Adjust the size of the default view when the widget is resized + if (Event.Type == sf::Event::Resized) + { + GetDefaultView().SetHalfSize(Event.Size.Width / 2.f, Event.Size.Height / 2.f); } } @@ -95,13 +100,16 @@ int main(int argc, char **argv) // Create a label for showing some text QLabel* Label = new QLabel("This is a SFML window\nembedded into a Qt frame :", MainFrame); - Label->move(20, 10); Label->setFont(QFont("courier new", 14, 1, false)); - Label->show(); // Create a SFML view inside the main frame - MyCanvas* SFMLView = new MyCanvas(MainFrame, QPoint(20, 60), QSize(360, 320)); - SFMLView->show(); - + MyCanvas* SFMLView = new MyCanvas(MainFrame); + + // Create the main layout + QVBoxLayout* Layout = new QVBoxLayout; + Layout->addWidget(Label, 0); + Layout->addWidget(SFMLView, 1); + MainFrame->setLayout(Layout); + return App.exec(); } diff --git a/samples/qt/QSFMLCanvas.cpp b/samples/qt/QSFMLCanvas.cpp index f4302ee2..2f75566c 100644 --- a/samples/qt/QSFMLCanvas.cpp +++ b/samples/qt/QSFMLCanvas.cpp @@ -3,6 +3,7 @@ // Headers //////////////////////////////////////////////////////////// #include "QSFMLCanvas.hpp" +#include // Platform-specific headers #ifdef Q_WS_X11 @@ -14,10 +15,12 @@ //////////////////////////////////////////////////////////// /// Construct the QSFMLCanvas //////////////////////////////////////////////////////////// -QSFMLCanvas::QSFMLCanvas(QWidget* Parent, const QPoint& Position, const QSize& Size, unsigned int FrameTime) : -QWidget (Parent), -myInitialized (false) +QSFMLCanvas::QSFMLCanvas(const QSize& Size, unsigned int FrameTime, QWidget* Parent) : +QWidget(Parent) { + // Resize the widget + resize(Size); + // Setup some states to allow direct rendering into the widget setAttribute(Qt::WA_PaintOnScreen); setAttribute(Qt::WA_OpaquePaintEvent); @@ -26,10 +29,6 @@ myInitialized (false) // Set strong focus to enable keyboard events to be received setFocusPolicy(Qt::StrongFocus); - // Setup the widget geometry - move(Position); - resize(Size); - // Setup the timer myTimer.setInterval(FrameTime); } @@ -74,12 +73,13 @@ QPaintEngine* QSFMLCanvas::paintEngine() const //////////////////////////////////////////////////////////// -/// Called when the widget is shown ; -/// we use it to initialize our SFML window +/// Called each time an event is received by the widget ; +/// we use it to catch the Polish event and initialize +/// our SFML window //////////////////////////////////////////////////////////// -void QSFMLCanvas::showEvent(QShowEvent*) +bool QSFMLCanvas::event(QEvent* Event) { - if (!myInitialized) + if (Event->type() == QEvent::Polish) { // Under X11, we need to flush the commands sent to the server to ensure that // SFML will get an updated view of the windows @@ -96,9 +96,9 @@ void QSFMLCanvas::showEvent(QShowEvent*) // Setup the timer to trigger a refresh at specified framerate connect(&myTimer, SIGNAL(timeout()), this, SLOT(repaint())); myTimer.start(); - - myInitialized = true; } + + return QWidget::event(Event); } diff --git a/samples/qt/QSFMLCanvas.hpp b/samples/qt/QSFMLCanvas.hpp index e02f0263..22a58ea5 100644 --- a/samples/qt/QSFMLCanvas.hpp +++ b/samples/qt/QSFMLCanvas.hpp @@ -6,10 +6,12 @@ // Headers //////////////////////////////////////////////////////////// #include -#include -#include +#include +#include +class QEvent; + //////////////////////////////////////////////////////////// /// QSFMLCanvas allows to run SFML in a Qt control //////////////////////////////////////////////////////////// @@ -20,13 +22,12 @@ public : //////////////////////////////////////////////////////////// /// Construct the QSFMLCanvas /// - /// \param Parent : Parent of the widget - /// \param Position : Position of the widget - /// \param Size : Size of the widget + /// \param Size : Initial size of the widget /// \param FrameTime : Frame duration, in milliseconds (0 by default) + /// \param Parent : Parent of the widget (NULL by default) /// //////////////////////////////////////////////////////////// - QSFMLCanvas(QWidget* Parent, const QPoint& Position, const QSize& Size, unsigned int FrameTime = 0); + QSFMLCanvas(const QSize& Size, unsigned int FrameTime = 0, QWidget* Parent = NULL); //////////////////////////////////////////////////////////// /// Destructor @@ -57,11 +58,12 @@ private : virtual QPaintEngine* paintEngine() const; //////////////////////////////////////////////////////////// - /// Called when the widget is shown ; - /// we use it to initialize our SFML window + /// Called each time an event is received by the widget ; + /// we use it to catch the Polish event and initialize + /// our SFML window /// //////////////////////////////////////////////////////////// - virtual void showEvent(QShowEvent*); + virtual bool event(QEvent* Event); //////////////////////////////////////////////////////////// /// Called when the widget needs to be painted ; @@ -73,8 +75,7 @@ private : //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - QTimer myTimer; ///< Timer used to update the view - bool myInitialized; ///< Tell whether the SFML window has been initialized or not + QTimer myTimer; ///< Timer used to update the view }; diff --git a/samples/wxwidgets/Main.cpp b/samples/wxwidgets/Main.cpp index dddc7ed8..1757afb1 100644 --- a/samples/wxwidgets/Main.cpp +++ b/samples/wxwidgets/Main.cpp @@ -79,13 +79,8 @@ public : /// //////////////////////////////////////////////////////////// MyFrame() : - wxFrame(NULL, wxID_ANY, wxT("SFML wxWidgets"), wxDefaultPosition, wxSize(680, 280)) + wxFrame(NULL, wxID_ANY, wxT("SFML wxWidgets"), wxDefaultPosition, wxSize(440, 280)) { - // Error log text box - wxTextCtrl* ErrorLog = new wxTextCtrl(this, wxID_ANY, wxT(""), wxPoint(440, 20), wxSize(200, 200), wxTE_MULTILINE | wxTE_READONLY | wxHSCROLL); - std::cerr.rdbuf(ErrorLog); - std::cerr << "-- This is the error log --" << std::endl; - // Let's create a SFML view new MyCanvas(this, wxID_ANY, wxPoint(20, 20), wxSize(400, 200)); } From 0ad6295ff417d6803c8aaa01c6ccd44e8f0b4b74 Mon Sep 17 00:00:00 2001 From: laurentgom Date: Wed, 17 Jun 2009 07:55:46 +0000 Subject: [PATCH 3/6] Fixed the Linux makefile of the Qt sample git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1145 4e206d99-4929-0410-ac5d-dfc041789085 --- samples/qt/Makefile | 2 +- src/SFML/Window/Linux/WindowImplX11.cpp | 13 ++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/samples/qt/Makefile b/samples/qt/Makefile index b02aba9b..43d09cdd 100644 --- a/samples/qt/Makefile +++ b/samples/qt/Makefile @@ -7,7 +7,7 @@ qt: $(OBJ) $(CC) $(LDFLAGS) -o $(EXECPATH)/$@ $(OBJ) -lsfml-graphics -lsfml-window -lsfml-system -lQtCore -lQtGui -lX11 %.o: %.cpp - $(CC) -o $@ -c $< $(CFLAGS) -I/usr/include/qt4 + $(CC) -o $@ -c $< $(CFLAGS) -I/usr/include/qt4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui .PHONY: clean mrproper diff --git a/src/SFML/Window/Linux/WindowImplX11.cpp b/src/SFML/Window/Linux/WindowImplX11.cpp index fa0bd8ef..edec19b0 100644 --- a/src/SFML/Window/Linux/WindowImplX11.cpp +++ b/src/SFML/Window/Linux/WindowImplX11.cpp @@ -349,20 +349,11 @@ WindowImplX11::~WindowImplX11() // Close the display CloseDisplay(); } - - + + //////////////////////////////////////////////////////////// /// Check if there's an active context on the current thread -//////////////////// //////////////////////////////////////////////////////////// -/// Filter the received events -/// (only allow those matching a specific window) -//////////////////////////////////////////////////////////// -Bool CheckEvent(::Display*, XEvent* Event, XPointer UserData) -{ - // Just check if the event matches our window - return Event->xany.window == reinterpret_cast< ::Window >(UserData); -}//////////////////////////////////////// bool WindowImplX11::IsContextActive() { return glXGetCurrentContext() != NULL; From e4042e8b4fe57e23ce940c0da95167f35138693a Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Thu, 18 Jun 2009 10:34:11 +0000 Subject: [PATCH 4/6] FS#117 - Fix POST requests not working with sf::Http git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1147 4e206d99-4929-0410-ac5d-dfc041789085 --- src/SFML/Network/Http.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/SFML/Network/Http.cpp b/src/SFML/Network/Http.cpp index af34a345..69ee0273 100644 --- a/src/SFML/Network/Http.cpp +++ b/src/SFML/Network/Http.cpp @@ -386,6 +386,10 @@ Http::Response Http::SendRequest(const Http::Request& Req, float Timeout) Out << ToSend.myBody.size(); ToSend.SetField("Content-Length", Out.str()); } + if ((ToSend.myMethod == Request::Post) && !ToSend.HasField("Content-Type")) + { + ToSend.SetField("Content-Type", "application/x-www-form-urlencoded"); + } // Prepare the response Response Received; From f04086c72b59d22e3a9c53bb4560856a6d00eeba Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Thu, 18 Jun 2009 16:13:42 +0000 Subject: [PATCH 5/6] FS#118 - Add "Connection: close" by default for HTTP 1.1 requests git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1148 4e206d99-4929-0410-ac5d-dfc041789085 --- src/SFML/Network/Http.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/SFML/Network/Http.cpp b/src/SFML/Network/Http.cpp index 69ee0273..64793406 100644 --- a/src/SFML/Network/Http.cpp +++ b/src/SFML/Network/Http.cpp @@ -390,6 +390,10 @@ Http::Response Http::SendRequest(const Http::Request& Req, float Timeout) { ToSend.SetField("Content-Type", "application/x-www-form-urlencoded"); } + if ((ToSend.myMajorVersion * 10 + ToSend.myMinorVersion >= 11) && !ToSend.HasField("Connection")) + { + ToSend.SetField("Connection", "close"); + } // Prepare the response Response Received; From 30efdbab36dc6100da641e6c65f9b3af43ad31ca Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Fri, 19 Jun 2009 07:32:36 +0000 Subject: [PATCH 6/6] Minor fix to the Qt sample git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1149 4e206d99-4929-0410-ac5d-dfc041789085 --- build/vc2008/sfml-graphics.vcproj | 24 ++++++++++-------------- samples/qt/Main.cpp | 2 +- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/build/vc2008/sfml-graphics.vcproj b/build/vc2008/sfml-graphics.vcproj index 24a62a30..8c7cb1e7 100644 --- a/build/vc2008/sfml-graphics.vcproj +++ b/build/vc2008/sfml-graphics.vcproj @@ -3281,7 +3281,7 @@ > - - diff --git a/samples/qt/Main.cpp b/samples/qt/Main.cpp index b022601f..29f9dd80 100644 --- a/samples/qt/Main.cpp +++ b/samples/qt/Main.cpp @@ -60,7 +60,7 @@ private : // Adjust the size of the default view when the widget is resized if (Event.Type == sf::Event::Resized) { - GetDefaultView().SetHalfSize(Event.Size.Width / 2.f, Event.Size.Height / 2.f); + GetDefaultView().SetFromRect(sf::FloatRect(0, 0, Event.Size.Width, Event.Size.Height)); } }