>>580
実装は自由だからどうとでもなるよ。

class PixelDevice implements RGB
{
       private Graphics device;
       public PixelDevice(Graphics device)
       {
             this.device = deveice;
       }
       public void drawLine(int x1,int y1,int x2,int y2)
       {
             device.drawLine( x1, y1, x2, y2 );
       }
       public void change(double red,double green,double blue)
       {
             device.setColor( new Color(0xFF * red,0xFF * green,0xFF * blue) );
       }
       public void change(int rgb){省略}
       public RGB to(RGB rgb){省略}
}