فهرست منبع

reverted to version 6089 because of display problems

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6446 8c9fc860-2736-0410-a75d-ab315db34111
eth.hunzikerp 9 سال پیش
والد
کامیت
9f88ddb15d
1فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 5 5
      source/WMGraphics.Mod

+ 5 - 5
source/WMGraphics.Mod

@@ -1,5 +1,5 @@
 MODULE WMGraphics;	(** AUTHOR "TF"; PURPOSE "Generic Graphic Support"; *)
-
+ 
 IMPORT
 	Kernel, Rectangles := WMRectangles, Raster, KernelLog, UTF8Strings, Strings, RasterScale := WMRasterScale,
 	Codecs, Files, Streams;
@@ -201,7 +201,7 @@ TYPE
 		PROCEDURE SetClipRect*(rect : Rectangle);
 		BEGIN
 			INCL(clipMode, ClipRect);
-			Rectangles.Normalize(rect);
+			rect.r := Max(rect.r, rect.l); rect.b := Max(rect.b, rect.t);
 			Rectangles.MoveRel(rect, dx, dy);
 			Rectangles.ClipRect(rect, limits);
 			clipRect := rect
@@ -298,7 +298,7 @@ TYPE
 		BEGIN
 			Fill(MakeRectangle(x, y, x + 1, y + 1), color, mode)
 		END SetPixel;
-		
+
 		(** fill a rectangle within the current clipping rectangle *)
 		PROCEDURE Fill*(rect : Rectangle; color : Color; mode : LONGINT);
 		END Fill;
@@ -385,7 +385,7 @@ TYPE
 
 		PROCEDURE SetLimits*(r : Rectangle);
 		BEGIN
-			Rectangles.Normalize(r);
+			r.r := Max(r.r, r.l); r.b := Max(r.t, r.b);
 			Rectangles.ClipRect(r, bounds); SetLimits^(r)
 		END SetLimits;
 
@@ -396,7 +396,6 @@ TYPE
 		PROCEDURE Fill*(rect : Rectangle; color : Color; mode : LONGINT);
 		VAR rm : Raster.Mode; pix : Raster.Pixel;
 		BEGIN
-			Rectangles.Normalize(rect);
 			(* convert to super coordinates *)
 			Rectangles.MoveRel(rect, dx, dy);
 			IF ClipRect IN clipMode THEN Rectangles.ClipRect(rect, clipRect) END;
@@ -844,6 +843,7 @@ BEGIN
 	imgCache.Clear;
 END ClearCache;
 
+
 BEGIN
  	nofFallbackFonts := 3;
 	NEW(imgCache)