本文整理汇总了C++中Lang::getSignSymbolCode方法的典型用法代码示例。如果您正苦于以下问题:C++ Lang::getSignSymbolCode方法的具体用法?C++ Lang::getSignSymbolCode怎么用?C++ Lang::getSignSymbolCode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lang
的用法示例。
在下文中一共展示了Lang::getSignSymbolCode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: drawSignSymbol
/*****************************************************
**
** PdfPainter --- drawSignSymbol
**
******************************************************/
void PdfPainter::drawSignSymbol( const int&x, const int &y, const int &sign, const int type, const int zoom, const double angle )
{
Lang lang;
double w, h;
wxString s;
if ( type == 2 ) s = textwriter->getSignName( sign, TSHORT );
else s = lang.getSignSymbolCode( sign, type );
getTextExtent( s, &w, &h );
/*
setTransparentBrush();
setDefaultPen();
drawRectangle( x-3, y-3, 6, 6 );
drawRectangle( x-10, y-10, 20, 20 );
*/
double x4 = x - .5 * w * cos( .25 * PI + angle * DEG2RAD );
double y4 = y + .5 * h * sin( .25 * PI + angle * DEG2RAD );
pdf->RotatedText( x4, y4, s, angle );
}
示例2: paintNorth
//.........这里部分代码省略.........
{ MyPoint( xcenter+xr, ycenter + yr ), MyPoint( xcenter+xr, ycenter ), MyPoint( xcenter+xi, ycenter + yi ) },
{ MyPoint( xcenter, ycenter ), MyPoint( xcenter+xi, ycenter+yi ), MyPoint( xcenter+xr, ycenter ), MyPoint( xcenter+xi, ycenter-yi ) },
{ MyPoint( xcenter+xr, ycenter - yr ), MyPoint( xcenter+xr, ycenter ), MyPoint( xcenter+xi, ycenter - yi ) },
{ MyPoint( xcenter, ycenter - yr ), MyPoint( xcenter+xr, ycenter-yr ), MyPoint( xcenter+xi, ycenter - yi ) },
};
// rectangle for separation of double charts
const MyRect transit_rect( xcenter - xm, ycenter - ym, 2 * xm, 2 * ym );
// draw filled polygons
GcZodiacalSigns *signs = &vconf->signs;
if ( signs->needsBgPaint() )
{
painter->setTransparentPen();
for ( i = ARIES; i <= PISCES; i++ )
{
painter->setBrush( signs->getBrush(redRasi( getAscendant() + i )));
painter->drawPolygon( i % 3 ? 3 : 4, (MyPoint*)rasi_polygons[i] );
}
}
paintOuterRectangle();
painter->setPen( defaultPen );
// diagonal from egde to egde paint one line or two depending on chart center
if ( ! ( chartprops->getVedicGraphicStyle().centerInfoType == VGRAPHIC_CHART_CENTER_NOTHING ))
{
painter->drawLine( xcenter - xr, ycenter - yr, xcenter - mtol, ycenter - mtol );
painter->drawLine( xcenter + mtol, ycenter + mtol, xcenter + xr, ycenter + yr );
painter->drawLine( xcenter - xr, ycenter + yr, xcenter - mtol, ycenter + mtol );
painter->drawLine( xcenter + mtol , ycenter - mtol, xcenter + xr, ycenter - yr );
}
else
{
painter->drawLine( xcenter - xr, ycenter - yr, xcenter + xr, ycenter + yr );
painter->drawLine( xcenter - xr, ycenter + yr, xcenter + xr, ycenter - yr );
}
painter->drawLine( xcenter, ycenter + yr, xcenter + xr, ycenter );
painter->drawLine( xcenter, ycenter + yr, xcenter - xr, ycenter );
painter->drawLine( xcenter, ycenter - yr, xcenter - xr, ycenter );
painter->drawLine( xcenter, ycenter - yr, xcenter + xr, ycenter );
if ( chart_count == 2 ) painter->drawRectangle( transit_rect );
/*********************************************************
** draw number of houses
*********************************************************/
if ( ! ( chartprops->getVedicGraphicStyle().northIndianSignDisplayType == VGRAPHIC_NORTH_INDIAN_SYMBOL )) painter->setGraphicFont( textzoom );
else painter->setSymbolFont( symbolzoom );
for ( i = ARIES; i <= PISCES; i++ )
{
current = redRasi( getAscendant() + i );
switch( chartprops->getVedicGraphicStyle().northIndianSignDisplayType )
{
case VGRAPHIC_NORTH_INDIAN_ASC:
s.Printf( wxT( "%d" ), current + 1 );
break;
case VGRAPHIC_NORTH_INDIAN_NUMBER:
s.Printf( wxT( "%d" ), current + 1 );
break;
case VGRAPHIC_NORTH_INDIAN_SHORT:
{
s = lang.getSignName( current, TSHORT );
}
break;
default:
s = lang.getSignSymbolCode( current );
break;
}
painter->drawSimpleText( sign_rect[i], s );
// leave after ascendant for style == 0
if ( chartprops->getVedicGraphicStyle().northIndianSignDisplayType == VGRAPHIC_NORTH_INDIAN_ASC ) break;
}
painter->setGraphicFont( textzoom );
/*********************************************************
** draw planets
*********************************************************/
if ( ! chartprops->isBlank() )
{
for ( i = ARIES; i <= PISCES; i++ )
{
if ( chart_count == 1 ) drawFieldText( rasi_rect[i], redRasi( i + getAscendant() ), rasi_alignment[i], 0, text_border );
else
{
drawFieldText( planet1_rect[i], redRasi( i + getAscendant() ), rasi_alignment[i], 0, text_border );
drawFieldText( planet2_rect[i], redRasi( i + getAscendant() ), rasi_alignment[i], 1, text_border );
}
}
paintCenterString();
}
painter->setGraphicFont( textzoom );
}