From 46132182f033f8e24e89036b6111fa470bb4abb0 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sun, 6 Feb 2000 17:13:14 +0000 Subject: [PATCH] compilation fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- Makefile.in | 6 ++++++ samples/configure | 8 +++++--- samples/configure.in | 1 + samples/rotate/rotate.cpp | 4 ++++ src/common/image.cpp | 8 ++++---- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Makefile.in b/Makefile.in index 8d1f613b01..21db9f2ddb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -881,6 +881,12 @@ SAMPLES_DIST: ALL_GUI_DIST cp $(SAMPDIR)/resource/*.h $(DISTDIR)/samples/resource cp $(SAMPDIR)/resource/*.wxr $(DISTDIR)/samples/resource + mkdir $(DISTDIR)/samples/rotate + cp $(SAMPDIR)/rotate/Makefile.in $(DISTDIR)/samples/rotate + cp $(SAMPDIR)/rotate/makefile.unx $(DISTDIR)/samples/rotate + cp $(SAMPDIR)/rotate/*.cpp $(DISTDIR)/samples/rotate + cp $(SAMPDIR)/rotate/*.bmp $(DISTDIR)/samples/rotate + mkdir $(DISTDIR)/samples/richedit cp $(SAMPDIR)/richedit/Makefile.in $(DISTDIR)/samples/richedit cp $(SAMPDIR)/richedit/*.cpp $(DISTDIR)/samples/richedit diff --git a/samples/configure b/samples/configure index cb782ff5ab..d55867cfab 100755 --- a/samples/configure +++ b/samples/configure @@ -2,7 +2,7 @@ # From configure.in Id: configure.in # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 +# Generated automatically using autoconf version 2.14 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -334,7 +334,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" + echo "configure generated by autoconf version 2.14" exit 0 ;; -with-* | --with-*) @@ -625,7 +625,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" + echo "$CONFIG_STATUS generated by autoconf version 2.14" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -670,6 +670,7 @@ trap 'rm -fr `echo " propsize/Makefile richedit/Makefile resource/Makefile + rotate/Makefile sashtest/Makefile scroll/Makefile scrollsub/Makefile @@ -799,6 +800,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile propsize/Makefile richedit/Makefile resource/Makefile + rotate/Makefile sashtest/Makefile scroll/Makefile scrollsub/Makefile diff --git a/samples/configure.in b/samples/configure.in index 3803a44d3e..6d8561f9ff 100644 --- a/samples/configure.in +++ b/samples/configure.in @@ -38,6 +38,7 @@ AC_OUTPUT([ propsize/Makefile richedit/Makefile resource/Makefile + rotate/Makefile sashtest/Makefile scroll/Makefile scrollsub/Makefile diff --git a/samples/rotate/rotate.cpp b/samples/rotate/rotate.cpp index 74b3f80551..df87c29685 100644 --- a/samples/rotate/rotate.cpp +++ b/samples/rotate/rotate.cpp @@ -16,6 +16,10 @@ #pragma hdrstop #endif +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + #include "wx/image.h" class MyApp: public wxApp diff --git a/src/common/image.cpp b/src/common/image.cpp index cbbf97b0bc..ac99956336 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -2756,11 +2756,11 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i wxRotationPoint p3 = rotated_point (img.GetWidth(), 0, cos_angle, sin_angle, p0); wxRotationPoint p4 = rotated_point (img.GetWidth(), img.GetHeight(), cos_angle, sin_angle, p0); - int x1 = floor (min (min(p1.x, p2.x), min(p3.x, p4.x))); - int y1 = floor (min (min(p1.y, p2.y), min(p3.y, p4.y))); + int x1 = floor (wxMin (wxMin(p1.x, p2.x), wxMin(p3.x, p4.x))); + int y1 = floor (wxMin (wxMin(p1.y, p2.y), wxMin(p3.y, p4.y))); - int x2 = ceil (max (max(p1.x, p2.x), max(p3.x, p4.x))); - int y2 = ceil (max (max(p1.y, p2.y), max(p3.y, p4.y))); + int x2 = ceil (wxMax (wxMax(p1.x, p2.x), wxMax(p3.x, p4.x))); + int y2 = ceil (wxMax (wxMax(p1.y, p2.y), wxMax(p3.y, p4.y))); wxImage rotated (x2 - x1 + 1, y2 - y1 + 1); -- 2.45.2