Sobre FillRect...

Delphi

25/04/2005

pessoal qual a função do procedimento [b:443c8e6cd3]FillRect[/b:443c8e6cd3]...


Bruno Belchior

Bruno Belchior

Curtidas 1

Respostas

Edilcimar

Edilcimar

25/04/2005

preencher, pintar o trect


GOSTEI 0
Bruno Belchior

Bruno Belchior

25/04/2005

certo mais por diversas vezes, reparei sua execução antes de alterar os atributos do TRect...


GOSTEI 0
Edilcimar

Edilcimar

25/04/2005

veja um pedaço de um programa onde utilizo trect para imprimir
Rect.Left := ColunaNome * IndiceH;
Rect.Top := LinhaNome * IndiceV;
Rect.Right := 950 * IndiceH;
Rect.Bottom := (Rect.Top + TextHeight(Nome) + 1) * IndiceV;
DrawText(Handle,Pchar(Nome),Length(Nome),
Rect,DT_WORDBREAK);
End;
If ImprimirResponsavel = True then
Begin
Font.Size := FonteResponsavel;
If NegritoResponsavel = True then
Font.Style := [fsBold]
Else
Font.Style := Font.Style - [fsBold];
Rect.Left := ColunaResponsavel * IndiceH;
Rect.Top := LinhaResponsavel * IndiceV;
Rect.Right := 950 * IndiceH;
Rect.Bottom := (Rect.Top + TextHeight(Responsavel) + 1) * IndiceV;
DrawText(Handle,Pchar(Responsavel),Length(Responsavel),
Rect,DT_WORDBREAK);
End;
If ImprimirEndereco = True then
Begin
Font.Size := FonteEndereco;
If NegritoEndereco = True then
Font.Style := [fsBold]
Else
Font.Style := Font.Style - [fsBold];
Rect.Left := ColunaEndereco * IndiceH;
Rect.Top := LinhaEndereco * IndiceV;
Rect.Right := 950 * IndiceH;
Rect.Bottom := (Rect.Top + TextHeight(Endereco) + 1) * IndiceV;
DrawText(Handle,Pchar(Endereco),Length(Endereco),
Rect,DT_WORDBREAK);


GOSTEI 0
Massuda

Massuda

25/04/2005

certo mais por diversas vezes, reparei sua execução antes de alterar os atributos do TRect...
Geralmente se executa um FillRect antes de iniciar o desenho de um componente para ´limpar´ o fundo do desenho.


GOSTEI 0
Bruno Belchior

Bruno Belchior

25/04/2005

[quote:76dd08bff0=´brunovicenteb´]certo mais por diversas vezes, reparei sua execução antes de alterar os atributos do TRect...
Geralmente se executa um FillRect antes de iniciar o desenho de um componente para ´limpar´ o fundo do desenho.[/quote:76dd08bff0]acho que o exemplo que vi utiliza exatamente essa idéia, pois é o primeiro método a ser executado...


GOSTEI 0
POSTAR