-OOP限定-プログラム設計相談室
■ このスレッドは過去ログ倉庫に格納されています
0584デフォルトの名無しさん
2011/07/04(月) 23:03:59.45実装は自由だからどうとでもなるよ。
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){省略}
}
■ このスレッドは過去ログ倉庫に格納されています