BitBlt(Canvas.Handle, // coordonnées x, // coordonnées y, // largeur étiquette, // hauteur étiquette, 0, 0, 0, WHITENESS);
with inherited Canvas do begin Brush.Color := FBrush.Color; Pen.Color := FPen.Color; // <--- ICI on efface FillRect(ClipRect); case FEtiquette of teCircle : DrawEtiqCircle; teEllipse : DrawEtiqEllipse; end; end;
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionprotected procedure Paint; override; procedure PaintShadow; virtual; procedure PaintTree; virtual;
procedure TTreeShape.Paint; var rc: bool; oldBmp: HBitmap; oldThumb: TRect; begin inherited Paint; with Canvas do begin Brush.Color := FBrush.Color; // FillRect(Canvas.ClipRect); // Pen.Mode := pmblack;//pmxor; {Création mémoire pour lasauvegarde du bitmap} if MemDC = 0 then MemDC := CreateCompatibleDC(Canvas.Handle); {Create image arbre} if Bitmap = 0 then Bitmap := CreateCompatibleBitmap(Canvas.Handle, Width, Height); Rect.top := 0; Rect.bottom := Height; Rect.left := (Width - 10) div 2; Rect.Right := Rect.Left + 10; SelectObject(MemDC, OldBmp); end; if Shadow then PaintShadow; PaintTree; end;
procedure TTreeShape.PaintTree; begin With Canvas do begin Canvas.Brush.Color := FBrush.Color; Canvas.Pen.Color := FPen.Color; Case FEtiquette of teCircle : DrawEtiqCircle; teEllipse : DrawEtiqEllipse; ... end; Case FConnexion of tcSolid : DrawConnectSolid; tcShortDodded: DrawConnectShortDodded; ... end; ... end; end;