界面库

更新
This commit is contained in:
tslediter 2024-07-02 14:44:15 +08:00
parent 7b9c9ae25e
commit 59b47c7122
3 changed files with 26 additions and 13 deletions

View File

@ -2075,7 +2075,7 @@ begin
dcmpdir := getdesignerpath()+"dcmps"+ioFileseparator(); dcmpdir := getdesignerpath()+"dcmps"+ioFileseparator();
CreateDirWithFileName(dcmpdir+"1.txt"); CreateDirWithFileName(dcmpdir+"1.txt");
osysdir := trim(sysgettsllibpath()); osysdir := trim(sysgettsllibpath());
if osysdir[length(osysdir)]<>";" then osysdir+=";"; if osysdir and osysdir[length(osysdir)]<>";" then osysdir+=";";
g_orig_lib_path := osysdir+Getfuncextdir()+ioFileseparator()+";"; g_orig_lib_path := osysdir+Getfuncextdir()+ioFileseparator()+";";
syssettsllibpath( dcmpdir+";"+g_orig_lib_path); syssettsllibpath( dcmpdir+";"+g_orig_lib_path);
ini := static getdesginerini(); ini := static getdesginerini();

View File

@ -2611,7 +2611,10 @@ type tcustomedit=class(TCustomControl)
private private
function geteditrect();virtual; function geteditrect();virtual;
begin begin
return ClientRect; r := ClientRect;
r[2]-=1;
r[3]-=1;
return r;
end end
function getBorder(); function getBorder();
begin begin

View File

@ -901,8 +901,8 @@ type tg_axes = class(tg_base) //
cmd_zoom_inc: cmd_zoom_inc:
begin begin
if not ifarray(pm) then return ; if not ifarray(pm) then return ;
p0 := pm["x"]; p0 := pm["cvsx"];
p1 := pm["y"]; p1 := pm["cvsy"];
for i := 0 to 2 do for i := 0 to 2 do
begin begin
a0 := fzoom_box[i,0]; a0 := fzoom_box[i,0];
@ -3604,6 +3604,7 @@ type tg_Polyline = class(tg_graph) //
function paint(cvs);override; //»æÍ¼ function paint(cvs);override; //»æÍ¼
begin begin
if tgc_on<> visible then return ; if tgc_on<> visible then return ;
tempbarw := 0;
if clip_state=tgc_on then if clip_state=tgc_on then
begin begin
//cvs.axesclip(); //cvs.axesclip();
@ -3619,13 +3620,21 @@ type tg_Polyline = class(tg_graph) //
begin begin
cvs.axesunclip(); cvs.axesunclip();
end end
//echo tostn(bx);
xys := array(); xys := array();
set_lineinfo_to_canvas(cvs); set_lineinfo_to_canvas(cvs);
ys := array(); ys := array();
for i,v in fgraph_data do for i,v in fgraph_data do
begin begin
if not zoom_to_xyz(v[0],v[1],bx[2,0],x,y) then return ; if not zoom_to_xyz(v[0],v[1],bx[2,0],x,y) then return ;
if not(tempbarw) and fbar_width>0 then ////////´¦ÀíbarµÄ¿í¶È///////
begin
zoom_to_xyz((v[0]+fbar_width/2),v[1],bx[2,0],xtemp,ytemp);
xtemp-=x;
ytemp-=y;
tempbarw := array();
tempbarw[0] := fbar_width*(xtemp)/(abs(xtemp)+abs(ytemp));
tempbarw[1] := fbar_width*(ytemp)/(abs(xtemp)+abs(ytemp));
end
xys[i] := array(integer(x),integer(y)); xys[i] := array(integer(x),integer(y));
case fpolyline_style of case fpolyline_style of
tgc_LS_bar,tgc_LS_barplot,tgc_LS_filled: tgc_LS_bar,tgc_LS_barplot,tgc_LS_filled:
@ -3637,7 +3646,7 @@ type tg_Polyline = class(tg_graph) //
end end
fline_points_in_canvas := xys; fline_points_in_canvas := xys;
//zoom_to_xyz(0,0,0,x,y); //zoom_to_xyz(0,0,0,x,y);
paint_lines(cvs,fpolyline_style,xys,fclosed,array("line_mode":line_mode,"bar_width":fbar_width,"color":lineinfo.color,"bkcolor":lineinfo.bkcolor,"xy0":ys)); paint_lines(cvs,fpolyline_style,xys,fclosed,array("line_mode":line_mode,"bar_width":tempbarw,"color":lineinfo.color,"bkcolor":lineinfo.bkcolor,"xy0":ys));
mk := markinfo.clone(); mk := markinfo.clone();
if mark_mode=tgc_on and mk.size>2 then if mark_mode=tgc_on and mk.size>2 then
begin begin
@ -3669,7 +3678,7 @@ type tg_Polyline = class(tg_graph) //
dis := ceil((rec[2]-rec[0])/5); dis := ceil((rec[2]-rec[0])/5);
xys := array((rec[0]+dis,y0),(rec[0]+4*dis,y0)); xys := array((rec[0]+dis,y0),(rec[0]+4*dis,y0));
set_lineinfo_to_canvas(cvs); set_lineinfo_to_canvas(cvs);
paint_lines(cvs,tgc_LS_interpolated,xys,0,array("line_mode":line_mode,"bar_width":fbar_width,"color":lineinfo.color,"bkcolor":lineinfo.bkcolor)); paint_lines(cvs,tgc_LS_interpolated,xys,0,array("line_mode":line_mode,"bar_width":array(fbar_width,0),"color":lineinfo.color,"bkcolor":lineinfo.bkcolor));
mk := markinfo.clone(); mk := markinfo.clone();
if mark_mode=tgc_on and mk.size>2 then if mark_mode=tgc_on and mk.size>2 then
begin begin
@ -4412,16 +4421,17 @@ begin
end end
o.tgc_LS_bar: o.tgc_LS_bar:
begin begin
b_w := integer(ifo["bar_width"]/2); b_w_x := integer(ifo["bar_width"][0]/2);
b_w_y := integer(ifo["bar_width"][1]/2);
cvs.brush.color := ifo["bkcolor"]; cvs.brush.color := ifo["bkcolor"];
for i,v in xys do for i,v in xys do
begin begin
if b_w>=1 then if b_w_x>=1 or b_w_y>1 then
begin begin
v1 := array(v[0]-b_w,v[1]); v1 := array(v[0]-b_w_x,v[1]-b_w_y);
v2 := array(v[0]+b_w,v[1]); v2 := array(v[0]+b_w_x,v[1]+b_w_y);
v3 := array(ifo["xy0",i,0]+b_w,ifo["xy0",i,1]); v3 := array(ifo["xy0",i,0]+b_w_x,ifo["xy0",i,1]+b_w_y);
v4 := array(ifo["xy0",i,0]-b_w,ifo["xy0",i,1]); v4 := array(ifo["xy0",i,0]-b_w_x,ifo["xy0",i,1]-b_w_y);
cvs.draw_polygon().points(array(v1,v2,v3,v4)).draw(); cvs.draw_polygon().points(array(v1,v2,v3,v4)).draw();
end else end else
begin begin