Курсовая работа: Разработка графического редактора
end;
end;
dtFonty: //ВЫВОД ТЕКСТА
begin
image1.Canvas.TextOut(bottomright.x,bottomright.y,edit1.Text);
end;
dtRomb: //РОМБ
begin
image1.Canvas.MoveTo(topleft.x+((bottomright.x-topleft.x) div 2),topleft.y);
image1.Canvas.LineTo(bottomright.x, bottomright.y-((bottomright.y-topleft.y) div 2));
image1.Canvas.MoveTo(topleft.x+((bottomright.x-topleft.x) div 2),topleft.y);
image1.Canvas.LineTo(topleft.x, topleft.y+((bottomright.y-topleft.y) div 2));
image1.Canvas.LineTo(topleft.x+((bottomright.x-topleft.x) div 2),bottomright.y);
image1.Canvas.LineTo(bottomright.x, bottomright.y-((bottomright.y-topleft.y) div 2));
end;
dtRectangle: //РИСОВАНИЕ ПРЯМОУГОЛЬНИКА
image1.Canvas.Rectangle(TopLeft.X, TopLeft.Y, BottomRight.X,
BottomRight.Y);
dtEllipse: //РИСОВАНИЕ ЭЛЛИПСА
image1.Canvas.Ellipse(Topleft.X, TopLeft.Y, BottomRight.X,
BottomRight.Y);
dtGum: //ЛАСТИК
begin
Pen.Mode :=pmcopy;
pen.Color:=clwhite;
pen.Width:=10;
image1.Canvas.Pixels[topleft.x,topleft.y]:= clwhite;
image1.Canvas.LineTo(BottomRight.X, BottomRight.Y);
end;