class NORMAL_RAHMEN_DEKORIERER inherit DEKORIERER redefine zeichne,make,verschiebe select make,zeichne,verschiebe end DEKORIERER rename zeichne as d_zeichne, make as d_make, verschiebe as d_verschiebe end creation make feature make(kompon : KOMPONENTE) is do d_make(kompon); set_name("Normal-Rahmen-Dekorierer"); set_color(red); setze_neue_koordinaten(komp.gib_x1r-5, komp.gib_y1r-5, komp.gib_x2r+5, komp.gib_y2r+5); end; zeichne(dc:WEL_CLIENT_DC) is do d_zeichne(dc); -- hier zusaetzliche Funktionen norm_rahmen_zeichnen(dc); end; verschiebe(x1, y1:INTEGER) is do d_verschiebe(x1+5, y1+5); norm_rahmen_verschieben(x1, y1); end; feature {NONE} norm_rahmen_zeichnen (dc:WEL_CLIENT_DC) is local stift:WEL_PEN; color:WEL_COLOR_REF; do !!stift.make_solid(1,komp_color); dc.select_pen(stift); dc.line(x1r.rounded, y1r.rounded, x2r.rounded, y1r.rounded); dc.line(x2r.rounded, y1r.rounded, x2r.rounded, y2r.rounded); dc.line(x2r.rounded, y2r.rounded, x1r.rounded, y2r.rounded); dc.line(x1r.rounded, y2r.rounded, x1r.rounded, y1r.rounded); stift.delete; end; norm_rahmen_verschieben(x1, y1:INTEGER) is do setze_neue_koordinaten(x1, y1, x1+(x2r-x1r).rounded, y1+(y2r-y1r).rounded); end; end -- class NORMAL_RAHMEN_DEKORIERER