Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Media";
Текущий архив: 2002.12.02;
Скачать: [xml.tar.bz2];

Вниз

Возможно ли на TImageSprite написать текст?   Найти похожие ветки 

 
Vius   (2002-08-15 18:28) [0]

Возможно ли на TImageSprite написать текст наподобие метода DXDraw.Surface.Canvas.TextOut или создать самому свойство Canvas?


 
Владимир Васильев   (2002-08-16 11:10) [1]



TProgress = class(TImageSprite)
private
FPosition : integer;
FMin : integer;
FMax : integer;
protected
public
FCaption : string;

procedure DoDraw; override;

property Position : integer read FPosition write FPosition ;
property Min : integer read FMin write FMin ;
property Max : integer read FMax write FMax ;

end;


procedure TProgress.DoDraw;
Var
ImageIndex: Integer;
begin
if FCaption<>"" then
With MainForm.DXDraw.Surface.Canvas do
begin
//font.color:=clAqua;
//font.color:=clFuchsia;
//font.color:=clYellow;
Brush.Style := bsClear;
font.color:=clRed;
font.Name:="Arial";
font.Size:=10;
font.Style:=[fsBold];

TextOut(Trunc(X)+10,Trunc(Y)+font.Height + 6 ,FCaption+" "+IntToStr(FPosition) );

Release;
end;

//inherited;
AnimPos := FPosition-1;
if AnimPos <0 then Exit;
ImageIndex:=AnimStart+Trunc(AnimPos);

//Image.Draw(Engine.Surface,Trunc(WorldX),Trunc(WorldY),ImageIndex);

//if Engine not defined for TProgress
Image.Draw(MainForm.DXDraw.Surface,Trunc(X),Trunc(Y),ImageIndex);

end;


 
Vius   (2002-08-16 11:44) [2]

Спасибо большое за помощь, это мне очень помогло, работает отлично!!!


 
Vius   (2002-08-16 11:45) [3]

Спасибо большое Владимир за помощь, это мне очень помогло, работает отлично!!!



Страницы: 1 вся ветка

Форум: "Media";
Текущий архив: 2002.12.02;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.44 MB
Время: 0.007 c
14-4607
Driverrr
2002-11-11 17:19
2002.12.02
Windows 2000


3-4201
oss
2002-11-13 15:40
2002.12.02
ADO lib


4-4684
antonioxxx
2002-10-18 16:18
2002.12.02
SetFileTime


1-4438
V-A-V
2002-11-20 08:33
2002.12.02
поиск в TreeView


1-4464
SSA
2002-11-20 13:03
2002.12.02
строки





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский