本文整理汇总了C++中BASE_SCREEN::ReturnPageSize方法的典型用法代码示例。如果您正苦于以下问题:C++ BASE_SCREEN::ReturnPageSize方法的具体用法?C++ BASE_SCREEN::ReturnPageSize怎么用?C++ BASE_SCREEN::ReturnPageSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BASE_SCREEN
的用法示例。
在下文中一共展示了BASE_SCREEN::ReturnPageSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: m_Draw_Auxiliary_Axe
void WinEDA_DrawPanel::m_Draw_Auxiliary_Axe(wxDC * DC, int drawmode)
/********************************************************************/
{
if ( m_Parent->m_Auxiliary_Axe_Position.x == 0 &&
m_Parent->m_Auxiliary_Axe_Position.y == 0 )
return;
int Color = DARKRED;
BASE_SCREEN * screen = GetScreen();
GRSetDrawMode(DC, drawmode);
/* Trace de l'axe vertical */
GRDashedLine(&m_ClipBox, DC,
m_Parent->m_Auxiliary_Axe_Position.x, -screen->ReturnPageSize().y,
m_Parent->m_Auxiliary_Axe_Position.x, screen->ReturnPageSize().y,
Color );
/* Trace de l'axe horizontal */
GRDashedLine(&m_ClipBox, DC,
-screen->ReturnPageSize().x, m_Parent->m_Auxiliary_Axe_Position.y,
screen->ReturnPageSize().x, m_Parent->m_Auxiliary_Axe_Position.y,
Color );
}
示例2: DrawBackGround
void WinEDA_DrawPanel::DrawBackGround(wxDC * DC)
/***********************************************/
/* Trace les axes X et Y et la grille
La grille n'est affichee que si elle peut etre facilement visible
La grille passe toujours par le centre de l'ecran
*/
{
int Color = BLUE;
BASE_SCREEN * screen = GetScreen();
int ii,jj ,xg , yg , color;
wxSize pas_grille_affichee;
bool drawgrid = FALSE;
int zoom = GetZoom();
wxSize size;
wxPoint org;
double pasx, pasy;
color = screen->m_GridColor;
GRSetDrawMode(DC, GR_COPY);
/* le pas d'affichage doit etre assez grand pour avoir une grille visible */
drawgrid = m_Parent->m_Draw_Grid;
pas_grille_affichee = screen->GetGrid();
ii = pas_grille_affichee.x / zoom;
if (ii < 5 ) { pas_grille_affichee.x *= 2 ; ii *= 2; }
if( ii < 5 ) drawgrid = FALSE; // grille trop petite
ii = pas_grille_affichee.y / zoom;
if (ii < 5 ) { pas_grille_affichee.y *= 2 ; ii *= 2; }
if( ii < 5 ) drawgrid = FALSE; // grille trop petite
GetViewStart(&org.x, &org.y);
GetScrollPixelsPerUnit(&ii, &jj);
org.x *= ii; org.y *= jj;
screen->m_StartVisu = org;
org.x *= zoom; org.y *= zoom;
org.x += screen->m_DrawOrg.x; org.y += screen->m_DrawOrg.y;
size = GetClientSize();
size.x *= zoom; size.y *= zoom;
pasx = screen->m_UserGrid.x * m_Parent->m_InternalUnits;
pasy = screen->m_UserGrid.y * m_Parent->m_InternalUnits;
if ( screen->m_UserGridUnit != INCHES )
{
pasx /= 25.4; pasy /= 25.4;
}
if( drawgrid)
{
m_Parent->PutOnGrid(&org) ;
GRSetColorPen(DC, color );
for ( ii = 0 ; ; ii++ )
{
xg = screen->m_UserGridIsON ? (int)( (ii * pasx) + 0.5)
:ii * pas_grille_affichee.x;
int xpos = org.x + xg;
for ( jj = 0 ; ; jj++ )
{
yg = screen->m_UserGridIsON ? (int)( (jj * pasy) + 0.5)
: jj * pas_grille_affichee.y;
GRPutPixel(&m_ClipBox, DC, xpos, org.y + yg, color);
if ( yg > size.y ) break;
}
if ( xg > size.x ) break;
}
}
/* trace des axes principaux */
if ( m_Parent->m_Draw_Axes )
{
/* Trace de l'axe vertical */
GRDashedLine(&m_ClipBox, DC, 0, -screen->ReturnPageSize().y,
0, screen->ReturnPageSize().y, Color );
/* Trace de l'axe horizontal */
GRDashedLine(&m_ClipBox, DC, -screen->ReturnPageSize().x, 0,
screen->ReturnPageSize().x, 0, Color );
}
/* trace des axes auxiliaires */
if ( m_Parent->m_Draw_Auxiliary_Axe)
{
m_Draw_Auxiliary_Axe(DC, FALSE);
}
}