当前位置: 首页>>代码示例>>C++>>正文


C++ Lang::getSignSymbolCode方法代码示例

本文整理汇总了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 );
}
开发者ID:akshaykinhikar,项目名称:maitreya7,代码行数:27,代码来源:PdfPainter.cpp

示例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 );
}
开发者ID:akshaykinhikar,项目名称:maitreya7,代码行数:101,代码来源:VedicRasiChart.cpp


注:本文中的Lang::getSignSymbolCode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。