Workshop/BoF: Graphics in GNU Classpath

2003-09-18 Thread Mark Wielaard
Hi all,

As you might already know Sascha Brawer convinced the nice people of
Linux Kongress 2003 to let us have a GNU Classpath developers workshop
about graphics support. It will take place on Tuesday Oct 14th in
Saarbrücken, Germany. And attending the workshop will be free. Much
thanks go to the Linux Kongress organizers! (*).

We now have two speakers. Jean-Daniel Fekete will give a talk about the
Agile2D OpenGL Renderer. And Mark Wielaard will talk about the GNU
Classpath VM interface issues. There is room for more presentations so
if you would like to give a presentation during the workshop or have
ideas for topics to discuss, please contact Sascha Brawer
([EMAIL PROTECTED]).

More details (and some papers to discuss) can be found at:
http://www.linux-kongress.org/2003/bofs/index.html#classpath

Hope to see some of you there.

Cheers,

Mark

(*) The official 10th International Linux System Technology Conference
program costs money but the program is really nice. There will be onde
day of tutorials, two days of talks, a keysigning party, a social event
and a keynote by Red Hat's CTO Michael Tiemann. So you are encouraged to
participate. See: http://www.linux-kongress.org/2003/


signature.asc
Description: This is a digitally signed message part
___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Documentation

2003-09-18 Thread Sascha Brawer
Ricky Clarkson <[EMAIL PROTECTED]> wrote on Tue, 16 Sep
2003 19:59:24 +0100:

>As you've probably guessed by now from previous emails, I'm bored,
>there's nothing on TV, so I'm browsing some Classpath source.  Once I
>can get it to configure and make properly I'll probably concentrate more
>on contributing source and fixing bugs than docs, but at least I know
>(hope) the docs will compile ok :)

It's very nice of you that you are doing this. IMHO, it is really
important to have legible and understandable documentation.

Do people on the list have an opinion about where reviewing/writing
documentation would be especially needed? A few random places might be:

- java.nio.charset.CharsetDecoder/CharsetEncoder
- java.util.logging.FileHandler (search for "FIXME: Javadoc missing");
- javax.swing.JComponent and its subclasses

Personally, I would find it especially helpful to have documentation
about java.awt.peer. However, this would be a bigger task, because one
would have to sift through the Classpath AWT code and find the call
sites. And since these interfaces are only used by AWT and concrete
toolkits, the audience would be rather small. On the other hand, it's a
package where no Sun documentation exists.

In any case, thanks for your contributions!

-- Sascha

Sascha Brawer, [EMAIL PROTECTED], http://www.dandelis.ch/people/brawer/ 




___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


classpath CVS not buildable

2003-09-18 Thread Michael Koch
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Graydon,


I saw that you commited gnu/java/awt/peer/gtk/GdkGraphics2D.java and 
other files into classpath. Unortunately this file has references to 
a class called GdkFont. But I can find no file defining the class 
GdkFont. Can you please fix this ?


Michael
- -- 
Homepage: http://www.worldforge.org/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/aXLDWSOgCCdjSDsRAgCwAJ4rsGC7O0D9i8fs0EBIpKA8nxF+0QCdFiNX
BucGOPKxWaQ2msnOoRYbKM4=
=w6Jy
-END PGP SIGNATURE-



___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Re: classpath CVS not buildable

2003-09-18 Thread Michael Koch
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am Donnerstag, 18. September 2003 10:54 schrieb Michael Koch:
> Hi Graydon,
>
>
> I saw that you commited gnu/java/awt/peer/gtk/GdkGraphics2D.java
> and other files into classpath. Unortunately this file has
> references to a class called GdkFont. But I can find no file
> defining the class GdkFont. Can you please fix this ?

To be more exact I present here the jikes compiler output as there are 
more errors then the described above:

Found 3 semantic errors compiling 
"/home/mkoch/src/classpath/gnu/java/awt/peer/gtk/GdkGraphics2D.java":

78.   private GdkFont font;
  ^-^
*** Semantic Error: Type gnu.java.awt.peer.gtk.GdkFont was not found.


  1135. if (f instanceof GdkFont)
 ^-^
*** Semantic Error: A candidate for type "GdkFont" was found, but it 
is invalid and needs to be fixed before this type will successfully 
comp
ile.


  1138.   font = new GdkFont (f.getAttributes ());
 ^-^
*** Semantic Error: A candidate for type "GdkFont" was found, but it 
is invalid and needs to be fixed before this type will successfully 
comp
ile.

Found 2 semantic errors compiling 
"/home/mkoch/src/classpath/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java":

50. public class GdkPixbufDecoder extends 
gnu.java.awt.image.ImageDecoder
 ^--^
*** Semantic Error: The abstract method "void produce(java.util.Vector 
v, java.io.FileInputStream is) throws java.io.IOException;", 
belonging
 to the superclass "gnu.java.awt.image.ImageDecoder", has default 
access, so it is not inherited and cannot be implemented in this 
package. T
herefore, class "gnu.java.awt.peer.gtk.GdkPixbufDecoder" must be 
abstract.


   211. BufferedImageBuilder bb = new BufferedImageBuilder ();
  ^-^
*** Semantic Error: An instance of 
"gnu.java.awt.peer.gtk.GdkPixbufDecoder.this" is not accessible here. 
In general, an enclosing instance is
 accessible only in the body of an instance method, constructor (after 
the explicit constructor invocation, if any), initializer block, or 
in
 the initializer expression of an instance variable.


Michael
- -- 
Homepage: http://www.worldforge.org/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/aXWaWSOgCCdjSDsRAsV1AJ4jp5qm1BRlpmg+tNoR/jxiwNMlggCfQ4HK
AyDlzC9ghXtg9A8KWTZkFZs=
=91at
-END PGP SIGNATURE-



___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Re: Workshop/BoF: Graphics in GNU Classpath

2003-09-18 Thread Patrik Reali
I will be in Saarbrücken.

-Patrik
--
Patrik Reali
http://www.reali.ch/~patrik/
http://www.oberon.ethz.ch/jaos/
http://iiop-net.sourceforge.net/



___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Re: extended peers

2003-09-18 Thread Sascha Brawer
Hi Graydon,

GH = graydon hoare <[EMAIL PROTECTED]> wrote:
SB = Sascha Brawer <[EMAIL PROTECTED]> wrote:

GH> [should Classpath have extended peers for java.awt.Font?]
SB> [proposal for ClasspathToolkit/ClasspathFontPeer]

GH> the font-related factory method on the toolkit should produce a
GH> ClasspathFontPeer, not a java.awt.Font.

SB> If the toolkit produces ClasspathFontPeers instead of java.awt.Fonts, the
SB> implementations of java.awt.Font.createFont and deriveFont somehow need
SB> to know whether the constructed Font should implement the
SB> java.awt.font.[OpenType, MultipleMaster] interfaces. 

GH> (1) Font constructors [...]
GH> (2) [static] Font.createFont, Font.decode, Font.getFont [...]
GH> (3) Font.deriveFont [...]
GH>
GH> my inclination is to call peer-returning factory methods on the
GH> Toolkit in case (1), call Font-returning factory methods on the
GH> Toolkit in case (2), and to call a method *on the peer* in case (3).

Case (1): Agreed.

Case (2): So, you're retracting the statement that font-related factory
methods should produce a ClasspathFontPeer instead of a java.awt.Font? I
think either way is fine. Presumably, producing Font might lead to a
cleaner code structure, while producing ClasspathFontPeer to less
duplication of code between toolkits. At the current stage, I'd prefer
simplicity (i.e., producing Fonts).

Case (3): I wonder whether this wouldn't make the peer interface
unnecessarily complicated. Since the static getFont(Map) method needs to
be supported anyway, I believe the following implementation for
deriveFont should do it. Or am I missing a reason why any toolkit would
want to override this?

package java.awt;
public class Font
{
  public static Font getFont(Map attrs)
  {
// this assumes that ClasspathToolkit returns Font, see (2) above
return ((ClasspathToolkit) Toolkit.getDefaultToolkit())
  .getFont(attrs);
  }

  public Font deriveFont(float size)
  {
Map attrs = getAttributes(); // returns a clone
attrs.put(TextAttribute.SIZE, new Float(size));
return getFont(attrs);
  }

  // more deriveFont methods, all done in a similar way
}



SB> I thought it would not hurt to allow that a single font peer is shared
SB> between scaled/transformed fonts.  On the other hand, if you think that
SB> passing the Font to the peer's methods is bad, I wouldn't have a problem
SB> to omit that argument.

GH> the benefit of this approach is that it places all the decisions about
GH> a font's behavior purely in the realm of the specific Toolkit and Peer
GH> subclasses, along with any choices you make about state representation. 
GH> the Font has no policy of its own; you store all state in the peer,
GH> where all policy is. imo it improves flexibility quite a bit.

>>> [some code snippets]

GH> well, how are you going to implement peer.getItalicAngle(), if the
GH> italic angle state is stored in the Font rather than the peer? 

Ah, I didn't mean to suggest storing anything besides point size,
transform, attribute map and peer in the font. For example, the italic
angle for the unscaled/untransformed font would be retrieved via some
platform-specific font ID. That ID would be stored inside the peer, not
inside the font.

  // On the Foo platform, one FooFontPeer is shared among all
  // scaled/transformed variants of the same font. Other
  // platforms are free to do it in a different way.
  class FooFontPeer
extends ClasspathFontPeer
  {
protected long platID;

private static native getUntransformedItalicAngle(long platID);

public float getItalicAngle(Font font)
{
  float angle = getUntransformedItalicAngle(platID);

  if (font.isTransformed())
  {
// Retrieve a clone of the font's transform.
AffineTransform tx = font.getTransform();
angle = someFunction(tx, angle);
  }

  return angle;
}
  }

As I said before, I wouldn't consider this to be very important. I think
it could be a nice optimization that might possibly be applicable in some
cases. Everywhere else, the "font" argument would be ignored. But if you
don't see the point, let's leave it away.

Best regards,

-- Sascha

Sascha Brawer, [EMAIL PROTECTED], http://www.dandelis.ch/people/brawer/ 




___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Re: request for comment on java2d stuff

2003-09-18 Thread Sascha Brawer
graydon hoare <[EMAIL PROTECTED]> wrote on Tue, 2 Sep 2003 20:25:19 -0400:

>http://gcc.gnu.org/ml/java-patches/2003-q3/msg00493.html

Another quick comment: Shouldn't setColor also store the passed color
into the paint field? From the Sun JavaDoc:

> The Graphics class defines only the setColor  method to control the
> color to be painted. Since the Java 2D API extends the Color object to
> implement the new Paint interface, the existing setColor method is now a
> convenience method for setting the current Paint attribute to a Color
> object. setColor(c) is equivalent to setPaint(c).

-- Sascha

Sascha Brawer, [EMAIL PROTECTED], http://www.dandelis.ch/people/brawer/ 




___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Re: request for comment on java2d stuff

2003-09-18 Thread Sascha Brawer
graydon hoare <[EMAIL PROTECTED]> wrote on Tue, 2 Sep 2003 20:25:19 -0400:

>http://gcc.gnu.org/ml/java-patches/2003-q3/msg00493.html

Yet another comment: With a little test program, I've noticed that Sun's
J2SE 1.4.1_01 (GNU/Linux, x86) sets the composite to
AlphaComposite.SrcOver when setPaintMode() is called, at least with the
Graphics2D implementation that is passed to JComponent.paint().

   public void setPaintMode () 
   { 
-setComposite (java.awt.AlphaComposite.Xor); 
+setComposite(java.awt.AlphaComposite.SrcOver); 
   }


Sorry for the mail flood. This will be the last message for a while.

-- Sascha

Sascha Brawer, [EMAIL PROTECTED], http://www.dandelis.ch/people/brawer/ 




___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Re: [patch #1909] [awt] Check permission for system event queue

2003-09-18 Thread Tom Tromey
> "Sascha" == Sascha Brawer <[EMAIL PROTECTED]> writes:

Sascha> How did you apply this patch?

Bogusly, it appears :-/.

I use the appended script to grab patches from web pages.  This messed
up the html in the comments, I'm afraid.  Sorry about that.

Tom


#! /bin/sh

# Usage: wpatch URL
# Download URL and prep for patching.

url=$1

wget -O- $url | recode HTML..UTF-8 | fixpatch | clcleanup


___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Re: [patch] fix to BufferedImage

2003-09-18 Thread graydon hoare
Stephen Crawley <[EMAIL PROTECTED]> writes:

> Here's how you write the call to ensure that you get the correct 
> overloaded method:
> 
>   samples = src.getPixels (x, y, w, h, (int[]) null);

this is the version I committed. thanks.

-graydon



___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Re: request for comment on java2d stuff

2003-09-18 Thread graydon hoare
Sascha Brawer <[EMAIL PROTECTED]> writes:

> Another quick comment: Shouldn't setColor also store the passed
> color into the paint field? From the Sun JavaDoc:

yup, and also:

>public void setPaintMode () 
>{ 
> -setComposite (java.awt.AlphaComposite.Xor); 
> +setComposite(java.awt.AlphaComposite.SrcOver); 
>}

yup. thanks for the sharp eyes, I guess I was thinking of the Xor
composite operator when I wrote that.

-graydon



___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Re: classpath CVS not buildable

2003-09-18 Thread graydon hoare
Michael Koch <[EMAIL PROTECTED]> writes:

> Am Donnerstag, 18. September 2003 10:54 schrieb Michael Koch:
> > Hi Graydon,
> >
> >
> > I saw that you commited gnu/java/awt/peer/gtk/GdkGraphics2D.java
> > and other files into classpath. Unortunately this file has
> > references to a class called GdkFont. But I can find no file
> > defining the class GdkFont. Can you please fix this ?
> 
> To be more exact I present here the jikes compiler output as there are 
> more errors then the described above:

goodness! I'm sorry. I didn't realize files were built as soon as they
were added to classpath; I didn't touch the Makefile but it seems to
do wildcarding. those files are incomplete, I just added them so
others could see my work and play with it if curious. I've backed them
out now. sorry.

-graydon



___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath


Fundamental changes in java.net

2003-09-18 Thread Michael Koch
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi list,


I commited a fundamental change in java.net. If you have problems with 
the new code in java.net please contact me. I will try to resolve all 
issues I dont found yet as fast as possible.


Michael
- -- 
Homepage: http://www.worldforge.org/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/ap+UWSOgCCdjSDsRAvWfAJ9171VeOyiLlkctGl//VY3CAbkv4ACgjnMp
DscEj/ajTZnSUMX8L2wgkxc=
=UTWo
-END PGP SIGNATURE-



___
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath