Patch level : 10.0
Files correlati : xi.dll Ricompilazione Demo : [ ] Commento : Aggiunto supporto per group box con spigoli smussati git-svn-id: svn://10.65.10.50/trunk@18129 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
2194155ee1
commit
88cfa4d4cb
21
xi/xi.c
21
xi/xi.c
@ -1158,19 +1158,28 @@ xi_draw_obj( XI_OBJ * xi_obj )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
XinPen cpen;
|
XinPen cpen = black_cpen;
|
||||||
XinBrush cbrush;
|
XinBrush cbrush = white_cbrush;
|
||||||
|
|
||||||
cpen = black_cpen;
|
|
||||||
if ( rect->fore_color )
|
if ( rect->fore_color )
|
||||||
cpen.fore_color = rect->fore_color;
|
cpen.fore_color = rect->fore_color;
|
||||||
XinWindowPenSet( win, &cpen );
|
|
||||||
cbrush.pattern = XinBrushSolid;
|
|
||||||
cbrush.fore_color = XI_COLOR_WHITE;
|
|
||||||
if ( rect->back_color )
|
if ( rect->back_color )
|
||||||
cbrush.fore_color = rect->back_color;
|
cbrush.fore_color = rect->back_color;
|
||||||
|
|
||||||
XinWindowBrushSet( win, &cbrush );
|
XinWindowBrushSet( win, &cbrush );
|
||||||
|
|
||||||
|
if ( rect->ridge )
|
||||||
|
{
|
||||||
|
XinWindowPenSet( win, &hollow_cpen );
|
||||||
xi_draw_rect( win, &rct );
|
xi_draw_rect( win, &rct );
|
||||||
|
XinWindowPenSet( win, &cpen );
|
||||||
|
xi_draw_roundrect( win, &rct, 4, 4 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
XinWindowPenSet( win, &cpen );
|
||||||
|
xi_draw_rect( win, &rct );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ( rect->bitmap != NULL )
|
if ( rect->bitmap != NULL )
|
||||||
{
|
{
|
||||||
|
2
xi/xi.h
2
xi/xi.h
@ -1453,6 +1453,8 @@ XIDLL BOOLEAN xi_rect_intersect XVT_CC_ARGS( ( XinRect * rctp, XinRect * rctp1
|
|||||||
XIDLL void xi_offset_rect( XinRect * rct, int delta_h, int delta_v );
|
XIDLL void xi_offset_rect( XinRect * rct, int delta_h, int delta_v );
|
||||||
XIDLL void xi_invalidate_rect( XinWindow win, XinRect * rctp );
|
XIDLL void xi_invalidate_rect( XinWindow win, XinRect * rctp );
|
||||||
XIDLL void xi_draw_rect( XinWindow win, XinRect * rctp );
|
XIDLL void xi_draw_rect( XinWindow win, XinRect * rctp );
|
||||||
|
XIDLL void xi_draw_roundrect( XinWindow win, XinRect * rctp, int rh, int rv );
|
||||||
|
|
||||||
XIDLL void xi_draw_line( XinWindow win, XinPoint p );
|
XIDLL void xi_draw_line( XinWindow win, XinPoint p );
|
||||||
XIDLL void xi_move_to( XinWindow win, XinPoint p );
|
XIDLL void xi_move_to( XinWindow win, XinPoint p );
|
||||||
|
|
||||||
|
17
xi/xiport.c
17
xi/xiport.c
@ -3577,6 +3577,23 @@ XinWindowRectDraw( XinWindow Win, XinRect * rctp )
|
|||||||
/*START*/
|
/*START*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
this function draws a dotted rectangle in the specified window (added by Guy).
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
XinWindowRoundRectDraw( XinWindow Win, XinRect * rctp, int rh, int rv )
|
||||||
|
{
|
||||||
|
/*END*/
|
||||||
|
RCT r;
|
||||||
|
r.left = rctp->left;
|
||||||
|
r.top = rctp->top;
|
||||||
|
r.right = rctp->right;
|
||||||
|
r.bottom = rctp->bottom;
|
||||||
|
xvt_dwin_draw_roundrect(( WINDOW ) Win, &r, rh, rv );
|
||||||
|
/*START*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
this function draws a dotted rectangle in the specified window (added by Guy).
|
this function draws a dotted rectangle in the specified window (added by Guy).
|
||||||
*/
|
*/
|
||||||
|
@ -692,6 +692,8 @@ extern "C"
|
|||||||
void XinWindowPolygonDraw( XinWindow win, XinPoint* points, int nbr_points );
|
void XinWindowPolygonDraw( XinWindow win, XinPoint* points, int nbr_points );
|
||||||
void XinWindowRectDraw( XinWindow win, XinRect * rect );
|
void XinWindowRectDraw( XinWindow win, XinRect * rect );
|
||||||
void XinWindowDottedRectDraw( XinWindow win, XinRect * rect ); /* Added by Guy */
|
void XinWindowDottedRectDraw( XinWindow win, XinRect * rect ); /* Added by Guy */
|
||||||
|
void XinWindowRoundRectDraw( XinWindow win, XinRect * rect, int rh, int rv ); /* Added by Guy */
|
||||||
|
|
||||||
XinRect *XinWindowRectGet( XinWindow win, XinRect * p_rect );
|
XinRect *XinWindowRectGet( XinWindow win, XinRect * p_rect );
|
||||||
void XinWindowRectInvalidate( XinWindow win, XinRect * rect );
|
void XinWindowRectInvalidate( XinWindow win, XinRect * rect );
|
||||||
XinRect *XinWindowRectOuterGet( XinWindow win, XinRect * p_rect );
|
XinRect *XinWindowRectOuterGet( XinWindow win, XinRect * p_rect );
|
||||||
|
34
xi/xiutils.c
34
xi/xiutils.c
@ -2212,6 +2212,40 @@ xi_draw_rect( XinWindow win, XinRect * rctp )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
xi_draw_roundrect( XinWindow win, XinRect * rctp, int rh, int rv )
|
||||||
|
{
|
||||||
|
if ( rctp->top >= rctp->bottom || rctp->left >= rctp->right )
|
||||||
|
return;
|
||||||
|
{
|
||||||
|
XinRect r;
|
||||||
|
|
||||||
|
#if XIWS == XIWS_WM
|
||||||
|
XinDrawTools ct;
|
||||||
|
|
||||||
|
r = *rctp;
|
||||||
|
adjust_point( &r.top );
|
||||||
|
adjust_point( &r.left );
|
||||||
|
adjust_point( &r.bottom );
|
||||||
|
adjust_point( &r.right );
|
||||||
|
xi_set_cur_window( win );
|
||||||
|
vrct_to_prct( win, &r );
|
||||||
|
XinWindowDrawToolsGet( win, &ct );
|
||||||
|
if ( ct.mode == XinDrawModeXor && !xi_is_rect_empty( &r ) )
|
||||||
|
ct.brush.color = XI_COLOR_BLACK;
|
||||||
|
if ( ct.brush.pat == XinPatternHollow )
|
||||||
|
ct.brush.color = ct.back_color;
|
||||||
|
XinWindowDrawToolsSet( win, &ct );
|
||||||
|
XinWindowRoundRectDraw( win, &r, radius, radius );
|
||||||
|
#else
|
||||||
|
r = *rctp;
|
||||||
|
xi_set_cur_window( win );
|
||||||
|
vrct_to_prct( win, &r );
|
||||||
|
XinWindowRoundRectDraw( win, &r, rh, rv );
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
xi_move_to( XinWindow win, XinPoint pnt )
|
xi_move_to( XinWindow win, XinPoint pnt )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user