Removed Visible property

This commit is contained in:
michael 2001-07-10 21:49:55 +00:00
parent f44c50aafb
commit 902514047d

View File

@ -44,7 +44,6 @@ type
FDrawPixMap : PgdkPixmap; FDrawPixMap : PgdkPixmap;
FPixMap : PgdkPixMap; FPixMap : PgdkPixMap;
FBitMap : PGdkBitMap; FBitMap : PGdkBitMap;
FVisible : Boolean;
Protected Protected
Procedure CreateSpriteFromData(SpriteData : PPGchar); Procedure CreateSpriteFromData(SpriteData : PPGchar);
Procedure CreatePixMap; Virtual; Abstract; Procedure CreatePixMap; Virtual; Abstract;
@ -55,7 +54,6 @@ type
Function GetChangeRect (Var Rect : TGDkRectAngle) : Boolean; Function GetChangeRect (Var Rect : TGDkRectAngle) : Boolean;
Property PixMap : PgdkPixMap Read FPixMap; Property PixMap : PgdkPixMap Read FPixMap;
Property BitMap : PGdkBitMap Read FBitMap; Property BitMap : PGdkBitMap Read FBitMap;
Property Visible : Boolean Read FVisible Write FVisible;
end; end;
TPad = Class (TSprite) TPad = Class (TSprite)
@ -378,7 +376,6 @@ Constructor TSprite.Create(DrawingArea: PGtkWidget);
begin begin
Inherited Create; Inherited Create;
FDrawingArea:=DrawingArea; FDrawingArea:=DrawingArea;
Visible:=False;
end; end;
Procedure TSprite.CreateSpriteFromData(SpriteData : PPGChar); Procedure TSprite.CreateSpriteFromData(SpriteData : PPGChar);
@ -396,19 +393,16 @@ Var
gc : PGDKGc; gc : PGDKGc;
begin begin
if Visible then if FPixMap=Nil then
begin CreatePixMap;
if FPixMap=Nil then gc:=gtk_widget_get_style(FDrawingArea)^.fg_gc[GTK_STATE_NORMAL];
CreatePixMap; gdk_gc_set_clip_origin(gc,Left,Top);
gc:=gtk_widget_get_style(FDrawingArea)^.fg_gc[GTK_STATE_NORMAL]; gdk_gc_set_clip_mask(gc,FBitmap);
gdk_gc_set_clip_origin(gc,Left,Top); if FDrawPixMap<>Nil then
gdk_gc_set_clip_mask(gc,FBitmap); gdk_draw_pixmap(FDrawPixMap,gc,FPixMap,0,0,Left,Top,Width,Height)
if FDrawPixMap<>Nil then else
gdk_draw_pixmap(FDrawPixMap,gc,FPixMap,0,0,Left,Top,Width,Height) gdk_draw_pixmap(FDrawPixMap{FDrawingArea^.window},gc,FPixMap,0,0,Left,Top,Width,Height);
else gdk_gc_set_clip_mask(gc,Nil);
gdk_draw_pixmap(FDrawPixMap{FDrawingArea^.window},gc,FPixMap,0,0,Left,Top,Width,Height);
gdk_gc_set_clip_mask(gc,Nil);
end;
end; end;
Function TSprite.GetChangeRect (Var Rect : TGDkRectAngle) : Boolean; Function TSprite.GetChangeRect (Var Rect : TGDkRectAngle) : Boolean;
@ -462,7 +456,6 @@ begin
Inherited Create(DrawingArea); Inherited Create(DrawingArea);
FSpeed:=6; FSpeed:=6;
FSlope:=50; FSlope:=50;
Visible:=True;
end; end;
Procedure TPad.CreatePixMap; Procedure TPad.CreatePixMap;
@ -549,7 +542,6 @@ begin
FCurrentSpeedY:=-100; FCurrentSpeedY:=-100;
FCurrentSpeedX:=0; FCurrentSpeedX:=0;
FSpeedFactor:=10; FSpeedFactor:=10;
Visible:=True;
end; end;
Procedure TBall.CreatePixMap; Procedure TBall.CreatePixMap;