Ver Mensaje Individual
  #4  
Antiguo 01-03-2012
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Reputación: 36
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola.

Sigo sin entenderte bién, pero a ver si lo que buscas es algo parecido a esto...
Código Delphi [-]
...
type
  TForm1 = class(TForm)
  ...
  private
    FPintando: Boolean;
    FColor: TColor;
  end;
...

implementation

procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  if Button = mbRight then
    FPintando:= not FPintando;  // habilita/deshabilita el pintado
end;

procedure TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
var
  P: TPicture;
begin
  if FPintando then
  begin
    P:= TPicture.Create;
    try
      P.Assign(Image1.Picture);
      Image1.Picture.Bitmap.Height:= P.Height;
      Image1.Picture.Bitmap.Width:= P.Width;
      Image1.Canvas.Draw(0, 0, P.Graphic);
      Image1.Canvas.Pixels[X ,Y]:= FColor;
    finally
      P.Free;
    end;
  end;
end;

procedure TForm1.btnColorClick(Sender: TObject);
begin
  if ColorDialog1.Execute then
    FColor:= ColorDialog1.Color;
end;
...

Saludos.
__________________
Daniel Didriksen

Guía de estilo - Uso de las etiquetas - La otra guía de estilo ....
Responder Con Cita