Форум: "KOL";
Текущий архив: 2005.11.20;
Скачать: [xml.tar.bz2];
ВнизTChart и KOL Найти похожие ветки
← →
Дмитрий Галин (2004-10-01 16:04) [0]Интересно, а существует ли в KOL какой-нибудь аналог компонента для рисования диаграм и графиков, наподобие TChart в VCL?
← →
Gandalf © (2004-10-08 21:31) [1]Неа... Нет. Я брался переводить оригинал - но послококль там работы до черта - а необходимости не много не доделал.
← →
Alex Shakhaylo (2004-10-29 22:09) [2]TChart нет, но есть скромненькая компонентка для рисования
графиков функций. По-моему называется как-то типа KOLPlotter.
← →
Halfback (2005-02-13 21:03) [3]А можно ссылку на аналоги TChart ??? Очень надо..
← →
ECM © (2005-02-14 10:42) [4]http://bonanzas.rinet.ru/KOLPlotter.zip
← →
RA © (2005-02-14 11:47) [5]А разве TChart не ActiveX?
← →
thaddy (2005-02-14 12:20) [6]I have written one that does "bar" and "pie" graphs but only 2 D.
I see if I can find it and publish it on my website in a few days ok? with sourcecode for you to improve :)
← →
thaddy (2005-02-14 12:30) [7]Here"s a quick tip to draw a Bar graph easily:
var
Bars:array[0..Pred(Mexvalues) of PControl;
i:Integer;
begin
for i:=0 to Pred(MaxValues) do
begin
Bars[i]:=NewProgressbarEx(form,[pboVertical, pboSmooth]).setsize(20,100).placeright;
Bare[i].maxprogress:=100;
Bars.Progress:=YourValue;
end;
etc......
← →
thaddy (2005-02-14 17:14) [8]Finished the beta.
- Bars, Stacked bars, Pies, more!
http://members.chello.nl/t.koning8/kol_graph_beta_1.zip
Have not time to add colorscheme code now. But it is easy.
Try it!
← →
Zoom (2005-03-08 21:31) [9]Меня вот тоже эта проблемка заинтересовала. В частности график. Вот простой компонент. http://rulezmaker.fatal.ru/scope.rar Попробовал перевести на KOL, естественно ничего не вышло. Был бы безмерно рад увидить его в MCK исполнении :)
← →
thaddy (2005-03-08 21:56) [10]Link doesn't work. Will you mail it to kol@clelo.nl? See what I can do.
← →
thaddy (2005-03-08 21:56) [11]kol@chello.nl, sorry.
← →
thaddy (2005-03-08 21:57) [12]kol@chello.nl, sorry.
← →
ECM © (2005-03-08 22:06) [13]>thaddy (08.03.05 21:56) [10]
>Link doesn"t work. Will you mail it to kol@clelo.nl? See what >I can do.
Tested - link work normaly. :)
← →
thaddy (2005-03-09 02:01) [14]Alpha version available for testing here: http://www.thaddy.com/kolscope.pas
← →
Paha (2005-03-09 02:46) [15]Я тоже буду очень благодарен если на KOL будет хоть какой-нибудь аналог компонента Чарт. Смотрел KOLPlotter - это не то что надо. Мне, например, надо строить графики/гистограммы исходя из массива значений а там (в KOLPlotter) тупо пишешь формулу и рисуется график. Второй камень в огород KOLPlotter - при его применении размер экзекутива увеличивается аж на 50Кб. Это уж совсем не оптимально. Так что thaddy жду от Вас достойного аналога VCL TChart компонента для KOL.
← →
thaddy (2005-03-09 09:39) [16]It is in beta on my website: http://www.thaddy.com/kol_graph_beta_1.zip
← →
Zoom (2005-03-09 20:32) [17]Thanx a lot! It works, but it would be more useful, if there was a mirror of this scope. ( I"m so cheeky! :-) )
← →
thaddy (2005-03-09 20:52) [18]I have made some small improvements and make it available as an official download from my site tomorrow (painting on resize).
I am sorry but I won"t write a mirror, since I do not use the MCK :-) Why don"t you help and write the mirror, as thanks for the fast translation :))
← →
Zoom (2005-03-09 20:56) [19]Oh. I think i can"t do it. It"s quite hard for me.
← →
thaddy (2005-03-09 21:07) [20]In general:
As you all know I have a lot of new controls for KOL without mirrors,
if someone would like to write mirrors for them: please contact me.
That would also force me to write them more carefull and finished!
I myself will not use mirrors unless I absolutely have to. It is recommended for almost everyone else, though.
← →
thaddy (2005-03-09 21:08) [21]In general:
As you all know I have a lot of new controls for KOL without mirrors,
if someone would like to write mirrors for them: please contact me.
That would also force me to write them more carefull and finished!
I myself will not use mirrors unless I absolutely have to. It is recommended for almost everyone else, though.
← →
Zoom (2005-03-09 22:04) [22]Ok. I"ve tested it and i like it! Let"s improve! For example, in this component, clearing of canvas in "tscope.clear" is made by Pen.PenStyle :=psClear;
May be it will be better, if we use InValidateRect or PatBlt ?
Also i got some braking, when i create tsope. ~ 1 or 2 sec, i got only white rectangle instead of scope.
← →
Zoom (2005-03-09 22:08) [23]I think this creating is better:
Function MyNewScope(AnOwner:PControl;width,height:integer):PSCope;
Is it?
← →
Zoom (2005-03-09 22:27) [24]in addition to prev. component:
http://rulezmaker.fatal.ru/indicator.rar
It"s much easier then tscope. :) Thanks, beforehand!
← →
thaddy (2005-03-09 22:36) [25]You notice updated - RC1- version on my website? It has a demo and paints better. It is better than the version I send you by email :-)
Ok. Try to do this as well... You study mirrors ;-)
← →
thaddy (2005-03-09 22:38) [26]Again, link does not work here (: please email!
← →
Zoom (2005-03-10 20:24) [27]To make that scope ideal, need to do ranging of graph, when you change size of scope. :)
← →
thaddy (2005-03-12 22:51) [28]http://www.kolindicator.zip available. Ok zoom?
← →
thaddy (2005-03-12 22:51) [29]http://www.thaddy.com/kolindicator.zip
← →
Zoom (2005-03-14 20:39) [30]Sorry, for not answering so long.
Cool. Works well. Respect! Now those 2 comp. are very good & useful set :)
← →
Paha (2005-03-14 23:48) [31]>> thaddy
Работа над KOL_graph еще продолжается? В последующем можешь выкладывать чтоб его инсталировать как компонент??? И напиши ридми что к нему надо в довесок(со ссылками желательно). Жду с нетерпением.
← →
thaddy (2005-03-14 23:55) [32]Last: No, I will *not* write MCK component for it. Someone else has to do that. I only use kol myself, not the MCK! (I type faster than I can recover broken mck generated code. I break it all the time :-))
First: I will attempt to improve the code when I have the time. Drawing of legend is still awkward/buggy, but drawing of the charts is ok.
← →
Zoom (2005-03-15 20:42) [33]About indicator: i think it would be better if there were controling not only 2 columns at once but individual to each column (for example to make a sound channels indicator)
← →
thaddy (2005-03-15 21:51) [34]Ok, made it stereo. Same link :)
← →
Zoom (2005-03-17 20:26) [35]Why didn"t you make it like this?:
For a:=0 to n do
begin
if a >= d1 then
FDrawBuffer.Canvas.pen.Color:=FForeground;
c:=3*a+2;
FDrawBuffer.Canvas.MoveTo(b-1,c);
FDrawBuffer.Canvas.LineTo(4,c);
c:=3*a+3;
FDrawBuffer.Canvas.MoveTo(b-1,c);
FDrawBuffer.Canvas.LineTo(4,c);
end;
instead of
For a:=0 to n do
begin
if a >= d1 then
FDrawBuffer.Canvas.pen.Color:=FForeground;
c:=3*a+2;
FDrawBuffer.Canvas.MoveTo(b-1,c);
FDrawBuffer.Canvas.LineTo(4,c);
end;
(and same on the other channel)
← →
thaddy (2005-03-17 22:09) [36]Good suggestion! But all I do is provide you with quick faithfull translations, right?
There"s a major optimization pending for the scope:
The original author shoud have used Scrollwindowex, and since Kol provides the cliprect as well, this really saves on processor time.
b.t.w: your demo is good, but it can"t properly recognize some AMD processors. Have a look at the fastcode things in the borland newsgroups for a better cpu recognizing algo, (or chat).
← →
thaddy (2005-03-17 22:13) [37]Zoom"s suggestion will be available within the next hour (GMT+1)
Same link.
← →
thaddy (2005-03-17 22:20) [38]I tried it: It failed. No update, unless zoom provides me with a working version;-) He has the code!
← →
Zoom (2005-03-18 07:41) [39]OK. I did only 2 changes. This:
procedure TIndicator.UpdateDrawBuffer;
var
a,b,c,d1,d2,n : integer;
begin
With PIndicatordata(CustomObj)^ do
begin
FDrawBuffer.canvas.Brush.Color:=FBackground;
FDrawBuffer.canvas.Pen.Color:=FBackground;
FDrawBuffer.Canvas.Rectangle(0,0,width,height);
n:=(height) div 3-2;
b:=(width div 2);
d1:=round(n/100*(100-fpositionL));
// if flink then
d2:=d1;
{else
d2:=round(n/100*(100-fpositionR));}
FDrawBuffer.Canvas.Pen.Color:=FShadow;
For a:=0 to n do
begin
if a >= d1 then
FDrawBuffer.Canvas.pen.Color:=FForeground;
c:=3*a+2;
FDrawBuffer.Canvas.MoveTo(b-1,c);
FDrawBuffer.Canvas.LineTo(4,c);
c:=3*a+3;
FDrawBuffer.Canvas.MoveTo(b-1,c);
FDrawBuffer.Canvas.LineTo(4,c);
end;
FDrawBuffer.Canvas.pen.Color:=Fshadow;
For a:=0 to n do
begin
if a >= d2 then
FDrawBuffer.Canvas.pen.Color:=FForeground;
c:=3*a+2;
FDrawBuffer.Canvas.MoveTo(b+1,c);
FDrawBuffer.Canvas.LineTo(Width-5,c);
c:=3*a+3;
FDrawBuffer.Canvas.MoveTo(b+1,c);
FDrawBuffer.Canvas.LineTo(Width-5,c);
end;
FDrawBuffer.Canvas.pen.Color:=Fshadow;
end;
end;
This:
function NewIndicator(anOwner:PControl;H,W:integer):PIndicator;
And this:procedure TIndicator.setcolors(bckgrnd,fgrnd,shdw:TColor);
begin
pIndicatordata(CustomObj).FBackground:=bckgrnd;
PIndicatordata(CustomObj).FForeground:=fgrnd;
PIndicatordata(CustomObj).FShadow:=shdw;
UpdateDrawBuffer;
Invalidate;
end;
← →
Zoom (2005-03-18 07:45) [40]My variant:
http://rulezmaker.fatal.ru/kolindicator.rar
Also i"ve found a trouble:
When i make a repaint on form resize, it works with your
WndProcIndicator and WndProcScope procedures, but when i minimize the window program crashes. Why?
Страницы: 1 2 вся ветка
Форум: "KOL";
Текущий архив: 2005.11.20;
Скачать: [xml.tar.bz2];
Память: 0.53 MB
Время: 0.038 c