Patch level : 10.0
Files correlati : xvaga.dll ba0 Ricompilazione Demo : [ ] Commento : Aggiunto metodo deflate ai rettangoli (c'era solo inflate) git-svn-id: svn://10.65.10.50/trunk@19616 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
4b0a9e960a
commit
28310e3bd5
@ -1942,9 +1942,9 @@ XVT_IMAGE_FORMAT xvt_image_get_format(XVT_IMAGE image)
|
||||
short xvt_image_get_ncolors(XVT_IMAGE image)
|
||||
{
|
||||
int n = 0;
|
||||
CAST_IMAGE(image, i);
|
||||
if (i != NULL && i->Ok() && i->HasPalette())
|
||||
{
|
||||
if (xvt_image_get_format(image) == XVT_IMAGE_CL8)
|
||||
{
|
||||
CAST_IMAGE(image, i);
|
||||
const wxPalette& pal = i->GetPalette();
|
||||
unsigned char r, g, b;
|
||||
for (n = 16; n < 256; n++)
|
||||
@ -2421,6 +2421,15 @@ BOOLEAN xvt_rect_set_pos(RCT *rctp, PNT pos)
|
||||
return ok;
|
||||
}
|
||||
|
||||
void xvt_rect_deflate(RCT *rctp, short ix, short iy)
|
||||
{
|
||||
if (rctp != NULL)
|
||||
{
|
||||
rctp->left += ix; rctp->right -= ix;
|
||||
rctp->top += iy; rctp->bottom -= iy;
|
||||
}
|
||||
}
|
||||
|
||||
void xvt_rect_inflate(RCT *rctp, short ix, short iy)
|
||||
{
|
||||
if (rctp != NULL)
|
||||
|
@ -297,9 +297,11 @@ XVTDLL BOOLEAN xvt_print_restart_thread();
|
||||
XVTDLL BOOLEAN xvt_print_is_pdf(const PRINT_RCD* precp);
|
||||
XVTDLL BOOLEAN xvt_print_pdf_version(char* version, int size);
|
||||
|
||||
XVTDLL void xvt_rect_deflate(RCT *rctp, short ix, short iy);
|
||||
XVTDLL int xvt_rect_get_height(const RCT *rctp);
|
||||
XVTDLL int xvt_rect_get_width(const RCT *rctp);
|
||||
XVTDLL BOOLEAN xvt_rect_has_point(const RCT *rctp, PNT pnt);
|
||||
XVTDLL void xvt_rect_inflate(RCT *rctp, short ix, short iy);
|
||||
XVTDLL BOOLEAN xvt_rect_intersect(RCT *drctp, const RCT *rctp1, const RCT *rctp2);
|
||||
XVTDLL BOOLEAN xvt_rect_is_empty(const RCT *rctp);
|
||||
XVTDLL void xvt_rect_offset(RCT *rctp, short dh, short dv);
|
||||
@ -307,7 +309,6 @@ XVTDLL void xvt_rect_set(RCT *rctp, short left, short top, short right, shor
|
||||
XVTDLL void xvt_rect_set_empty(RCT *rctp);
|
||||
XVTDLL void xvt_rect_set_null(RCT* rctp);
|
||||
XVTDLL BOOLEAN xvt_rect_set_pos(RCT *rctp, PNT pos);
|
||||
XVTDLL void xvt_rect_inflate(RCT *rctp, short ix, short iy);
|
||||
|
||||
XVTDLL void xvt_res_free_menu_tree(MENU_ITEM* tree);
|
||||
XVTDLL XVT_FNTID xvt_res_get_font(int rid);
|
||||
|
@ -28,15 +28,26 @@ wxString xvtart_GetResourceName(const char* type, int rid)
|
||||
|
||||
if ((rid == ICON_RSRC || rid == 0) && strName == "Icons")
|
||||
{
|
||||
char name[MAX_PATH];
|
||||
if (xvt_sys_get_oem_string("Icon", "", name, sizeof(name)))
|
||||
int i = 1;
|
||||
switch (xvt_sys_get_os_version())
|
||||
{
|
||||
wxFileName fname(startup_dir + "/setup/" + name);
|
||||
if (fname.FileExists())
|
||||
case XVT_WS_WIN_2000:
|
||||
case XVT_WS_WIN_2003: i = 0; break; // Cerco prima l'icona a 256 colori
|
||||
default : i = 1; break; // Cerco solo l'icona in RGBA
|
||||
}
|
||||
for (; i < 2; i++)
|
||||
{
|
||||
const char* const oem_var = i == 0 ? "Icon256" : "Icon";
|
||||
char name[MAX_PATH];
|
||||
if (xvt_sys_get_oem_string(oem_var, "", name, sizeof(name)))
|
||||
{
|
||||
fname.Normalize();
|
||||
strName = fname.GetFullPath().Lower();
|
||||
return strName;
|
||||
wxFileName fname(startup_dir + "/setup/" + name);
|
||||
if (fname.FileExists())
|
||||
{
|
||||
fname.Normalize();
|
||||
strName = fname.GetFullPath().Lower();
|
||||
return strName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -232,20 +243,28 @@ wxIconBundle TArtProvider::CreateIconBundle(const wxArtID& id, const wxArtClient
|
||||
|
||||
wxSize TArtProvider::GetNativeSizeHint(const wxArtClient& client)
|
||||
{
|
||||
int ix = 32, iy = 32;
|
||||
|
||||
if (client == wxART_FRAME_ICON)
|
||||
{
|
||||
const int ix = wxSystemSettings::GetMetric(wxSYS_SMALLICON_X);
|
||||
const int iy = wxSystemSettings::GetMetric(wxSYS_SMALLICON_Y);
|
||||
return wxSize(ix,iy);
|
||||
const int x = wxSystemSettings::GetMetric(wxSYS_SMALLICON_X);
|
||||
const int y = wxSystemSettings::GetMetric(wxSYS_SMALLICON_Y);
|
||||
if (x > 0 && y > 0)
|
||||
{ ix = x; iy = y; }
|
||||
else
|
||||
{ ix /= 2; iy /= 2; }
|
||||
}
|
||||
else
|
||||
{
|
||||
const int x = wxSystemSettings::GetMetric(wxSYS_ICON_X);
|
||||
const int y = wxSystemSettings::GetMetric(wxSYS_ICON_Y);
|
||||
if (x > 0 && y > 0)
|
||||
{ ix = x; iy = y; }
|
||||
if (client == wxART_MESSAGE_BOX)
|
||||
{ ix *= 2; iy *= 2; }
|
||||
}
|
||||
|
||||
const int ix = wxSystemSettings::GetMetric(wxSYS_ICON_X);
|
||||
const int iy = wxSystemSettings::GetMetric(wxSYS_ICON_Y);
|
||||
|
||||
if (client == wxART_MESSAGE_BOX)
|
||||
return wxSize(ix*2,iy*2);
|
||||
|
||||
return wxSize(ix, iy);
|
||||
return wxSize(ix,iy);
|
||||
}
|
||||
|
||||
wxIconBundle TArtProvider::GetIconBundle(const wxArtID& id, const wxArtClient& client)
|
||||
|
Loading…
x
Reference in New Issue
Block a user