X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2FPixelBuffer.java;h=207611290a71d09e7d8057b8ad029e41c0863364;hb=16c24a73c1c1b2955db0bbbaf5a940215329bca1;hp=740f224e0f32cce33319ac72927efd6fb0f79ff6;hpb=a7bc8922080f56017b141a3835c722344fa4cffc;p=org.ibex.core.git diff --git a/src/org/xwt/PixelBuffer.java b/src/org/xwt/PixelBuffer.java index 740f224..2076112 100644 --- a/src/org/xwt/PixelBuffer.java +++ b/src/org/xwt/PixelBuffer.java @@ -1,4 +1,4 @@ -// Copyright 2003 Adam Megacz, see the COPYING file for licensing [GPL] +// Copyright 2004 Adam Megacz, see the COPYING file for licensing [GPL] package org.xwt; /** @@ -22,7 +22,7 @@ package org.xwt; public abstract class PixelBuffer { /** draw the picture at (dx1, dy1), cropping to (cx1, cy1, cx2, cy2) */ - public abstract void drawPicture(Picture source, int dx1, int dy1, int cx1, int cy1, int cx2, int cy2); + protected abstract void drawPicture(Picture source, int dx1, int dy1, int cx1, int cy1, int cx2, int cy2); /** fill a trapezoid whose top and bottom edges are horizontal */ public abstract void fillTrapezoid(int x1, int x2, int y1, int x3, int x4, int y2, int color); @@ -32,7 +32,7 @@ public abstract class PixelBuffer { * channels of the Picture in the process. This method may assume that the RGB channels of the image are all zero IFF it * restores this invariant before returning. */ - public abstract void drawPictureAlphaOnly(Picture source, int dx1, int dy1, int cx1, int cy1, int cx2, int cy2, int rgb); + public abstract void drawGlyph(Font.Glyph source, int dx1, int dy1, int cx1, int cy1, int cx2, int cy2, int rgb); // FEATURE: we want floats (inter-pixel spacing) for antialiasing, but this hoses the fastpath line drawing... argh! /** draws a line of width w; note that the coordinates here are post-transform */ @@ -41,7 +41,8 @@ public abstract class PixelBuffer { if (y1 > y2) { int t = x1; x1 = x2; x2 = t; t = y1; y1 = y2; y2 = t; } if (x1 == x2) { - fillTrapezoid(x1 - w / 2, x2 + w / 2, y1 - (capped ? w / 2 : 0), x1 - w / 2, x2 + w / 2, y2 + (capped ? w / 2 : 0), color); + fillTrapezoid(x1 - w / 2, x2 + w / 2, y1 - (capped ? w / 2 : 0), + x1 - w / 2, x2 + w / 2, y2 + (capped ? w / 2 : 0), color); return; }