本文整理汇总了C++中Lang::getSignName方法的典型用法代码示例。如果您正苦于以下问题:C++ Lang::getSignName方法的具体用法?C++ Lang::getSignName怎么用?C++ Lang::getSignName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lang
的用法示例。
在下文中一共展示了Lang::getSignName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getLenString
// unused
const wxString Formatter::getLenString( const double &len, const int format, const int dir )
{
wxString s;
Lang lang;
s << ( dir == 1 ? 'R' : 'D' );
double mylen = red_deg( len );
const int sign = (int)( mylen / 30 );
mylen -= 30 * sign;
s << getDegMinSecFormatted( mylen, format, 0.0, 30.0 ) << lang.getSignName(sign);
return s;
}
示例2: getTextExtent
/*****************************************************
**
** Painter --- getTextExtent
**
******************************************************/
MPoint Painter::getTextExtent( const MToken &token )
{
const wxFont oldFont = getCurrentFont();
wxString s;
Lang lang;
SheetFormatter formatter( writercfg );
MPoint p;
wxChar symbol = 0;
SymbolProvider sp( writercfg );
switch ( token.entity )
{
case TTSE_PLANET:
if ( writercfg->planetSymbols ) symbol = sp.getPlanetCode( (ObjectId)token.entityId );
if ( ! symbol ) s = formatter.getObjectNamePlain( (ObjectId)token.entityId, token.textFormat, token.vedic );
break;
case TTSE_SIGN:
if ( writercfg->signSymbols ) symbol = sp.getSignCode( (Rasi)token.entityId );
if ( ! symbol ) s = lang.getSignName( (Rasi)token.entityId, token.textFormat ); //, writercfg->vedicSignNames );
break;
case TTSE_ASPECT:
symbol = SymbolProvider().getAspectCode( (ASPECT_TYPE)token.entityId );
if ( ! symbol ) s = AspectExpert::getAspectShortDescription( (int)token.entityId );
break;
case TTSE_DIRECTION:
symbol = sp.getRetroCode( (MOVING_DIRECTION)token.entityId );
if ( ! symbol ) s = wxT( "R" );
break;
default:
symbol = 0;
s = token.text;
break;
}
if ( symbol )
{
const int pointSize = oldFont.GetPointSize();
setFont( *FontProvider::get()->getFontBySize( FONT_GRAPHIC_SYMBOLS, pointSize ));
p = getTextExtent( symbol );
}
else
{
p = getTextExtent( s );
}
setFont( oldFont );
return p;
}
示例3: 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 );
}