diff --git a/funcext/tvclib/twincontrol.tsf b/funcext/tvclib/twincontrol.tsf index ff8785d..fac5dd4 100644 --- a/funcext/tvclib/twincontrol.tsf +++ b/funcext/tvclib/twincontrol.tsf @@ -1452,7 +1452,8 @@ type TWinControl = class(tcontrol) rgb := _wapi.CreateRectRgn(outrect[0],outrect[1],outrect[2],outrect[3]); //控件区域 //_wapi.CombineRgn(rgC,rga,rgb,RGN_AND); //控件绘画区域 //bkrg := _wapi.SelectClipRgn(TheMessage.wparam,rgc); //裁剪区域 - bkrg := _wapi.SelectClipRgn(TheMessage.wparam,rgb); //裁剪区域 + //bkrg := + _wapi.SelectClipRgn(TheMessage.wparam,rgb); //裁剪区域 try pts := it.PaintStruct(); pts._setvalue_("rcpaint",array(outrect[0]-itbounds[0],outrect[1]-itbounds[1],outrect[2]-itbounds[0],outrect[3]-itbounds[1])); @@ -1461,7 +1462,7 @@ type TWinControl = class(tcontrol) it.Perform(ne); _wapi.SetViewportOrgEx(TheMessage.wparam,c[0],c[1],nil); //恢复基准点 finally - _wapi.SelectClipRgn(TheMessage.wparam,bkrg); //恢复区域 + //_wapi.SelectClipRgn(TheMessage.wparam,bkrg); //恢复区域 _wapi.DeleteObject(rgb); //销毁区域 end; end diff --git a/funcext/tvclib/ugtkinterface.tsf b/funcext/tvclib/ugtkinterface.tsf index 48d119c..e4fb913 100644 --- a/funcext/tvclib/ugtkinterface.tsf +++ b/funcext/tvclib/ugtkinterface.tsf @@ -4736,11 +4736,12 @@ type tgtkapis = class() //gtk function cairo_applay_pen_style(dc); begin pt := gtk_object_get_data(dc,"pen.style"); - if pt=0x2 then + if pt=0x2 or pt=0x3 or pt=0x4 then begin cairo_set_dash(dc,array(4.0,1.0),2,0); end else cairo_set_dash(dc,array(4.0,0.0),2,0); + return pt=5; end function cairo_draw_round_rectangle(cr,x,y,w,h,r); begin diff --git a/funcext/tvclib/utslvclauxiliary.tsf b/funcext/tvclib/utslvclauxiliary.tsf index 3cd184a..f98c946 100644 --- a/funcext/tvclib/utslvclauxiliary.tsf +++ b/funcext/tvclib/utslvclauxiliary.tsf @@ -2243,11 +2243,12 @@ type TCanvsRgnClipAutoSave=class() FCvsHandle := cvs.Handle; FCrg := FW32api.CreateRectRgn(rec[0],rec[1],rec[2],rec[3]); FBKrg := FW32api.SelectClipRgn(FCvsHandle,FCrg); //裁剪区域 + FBKrg := nil; end end function Destroy(); begin - if FW32api and FCvsHandle and FBKrg and FCrg then + if FW32api and FCvsHandle {and FBKrg} and FCrg then begin FW32api.SelectClipRgn(FCvsHandle,FBKrg); //恢复区域 FW32api.DeleteObject(FCrg); //销毁区域 diff --git a/funcext/tvclib/utslvclgdi.tsf b/funcext/tvclib/utslvclgdi.tsf index 6c3f774..d1ba25e 100644 --- a/funcext/tvclib/utslvclgdi.tsf +++ b/funcext/tvclib/utslvclgdi.tsf @@ -2305,13 +2305,13 @@ type TcustomCanvas = class(TSLUIBASE) end return r; end - function SelectClipRgn(rgn); + (*function SelectClipRgn(rgn); begin {** @explan(说明) 设置区域 %% @param(rgn)(TRgn) 选择区域 %% **} - if rgn=FRgn then exit; + if rgn and (rgn=FRgn) then exit; r := FRgn; FRgn := rgn; if not HandleAllocated()then exit; @@ -2324,7 +2324,7 @@ type TcustomCanvas = class(TSLUIBASE) end if r is class(trgn)then return r; return r1; - end + end*) function create();override; begin inherited; diff --git a/funcext/tvclib/utvclgraphics.tsf b/funcext/tvclib/utvclgraphics.tsf index 745851b..3aee64d 100644 --- a/funcext/tvclib/utvclgraphics.tsf +++ b/funcext/tvclib/utvclgraphics.tsf @@ -682,9 +682,13 @@ type tg_axes = class(tg_graph) // function paint(cvs);override; begin if not visible then return ; - modify_coordinate_postion(); - inherited; + modify_coordinate_postion(); + r := array(p_left-1,p_top-1,p_left+p_width+1,p_top+p_height+1); + o := new TCanvsRgnClipAutoSave(cvs,r); + inherited; + o := nil; paint_grid(cvs); + for i,v in faxes_objects do //绘制坐标 begin v.paint(cvs); @@ -1330,7 +1334,10 @@ type tg_Polyline = class(tg_graph) end else begin - cvs.draw_polyline().points(xys).draw(); + if fclosed and length(xys)>2 then + cvs.draw_polyline().points( xys union xys[0:0]).draw(); + else + cvs.draw_polyline().points(xys).draw(); end end; mk := markinfo;