Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] How tall is the empty String?

Both points in the testcase below should have the same
height. If this is not true on any platform, log a PR
against it.

Silenio

import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.graphics.*;

public class C {
 
        public static void  main(String[] arg) {
                Display display = new Display();
 
                GC gc =  new GC (display);
                Point p1 = gc.stringExtent("");
                Point p2 = gc.stringExtent("T");
                gc.dispose();
 
                display.dispose(); 
 
                System.out.println(p1);
                System.out.println(p2);
        }

}




"Randy Hudson" <hudsonr@xxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx
03/12/02 03:17 PM
Please respond to platform-swt-dev

 
        To:     platform-swt-dev@xxxxxxxxxxx
        cc: 
        Subject:        [platform-swt-dev] How tall is the empty String?

This is a philisophical question, but I thought I would ask it just to be
sure

If I have a GC and call:
Point p = gc.getTextExtent("");

Will I always get back 0,0?  I think that's wrong, I think it has height,
but no width.  Will all platforms return 0,0?

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev





Back to the top