void QgsMarkerSymbolLayer::drawPreviewIcon( QgsSymbolRenderContext &context, QSize size )
{
  startRender( context );
  QgsPaintEffect *effect = paintEffect();
  if ( effect && effect->enabled() )
  {
    QgsEffectPainter p( context.renderContext(), effect );
    renderPoint( QPointF( size.width() / 2, size.height() / 2 ), context );
  }
  else
  {
    renderPoint( QPointF( size.width() / 2, size.height() / 2 ), context );
  }
  stopRender( context );
}
Exemple #2
0
		void PathGroup::render() {
			Renderer* g = ARK2D::getRenderer();
			g->setDrawColor(Color::white);

			// render points.
			for(unsigned int i = 0; i < paths.size(); i++) {
				for(unsigned int j = 0; j < paths.at(i)->subpaths.at(0)->points.size(); j++) {
					Vector2<float>* p = paths.at(i)->subpaths.at(0)->points.at(j);
					renderPoint(p->getX(), p->getY(), (j == 0 || j == paths.at(i)->subpaths.at(0)->points.size()-1));
				}
			}

			// render curve.
			renderCurve();

			// render straight lines.
			for(unsigned int i = 0; i < paths.size(); i++) {
				SubPath* mainPath = paths.at(i)->subpaths.at(0);
				for(unsigned int j = 0; j < mainPath->points.size(); j++) {
					if (j+1 != mainPath->points.size()) {
						renderLine(
							mainPath->points.at(j)->getX(),
							mainPath->points.at(j)->getY(),
							mainPath->points.at(j+1)->getX(),
							mainPath->points.at(j+1)->getY()
						);
					}
				}
			}



		}
Exemple #3
0
void asciimage::Shape::render(QPainter* painter, int scale, const Style& style) const
{
    painter->save();

    if (style.isCutting())
    {
        painter->setCompositionMode(QPainter::CompositionMode_Clear);
    }

    switch (type())
    {
    case Type::EMPTY:
        // nothing to do
        break;

    case Type::POINT:
        renderPoint(painter, scale, style);
        break;

    case Type::LINE:
        renderLine(painter, scale, style);
        break;

    case Type::POLYGON:
        renderPolygon(painter, scale, style);
        break;

    case Type::ELLIPSE:
        renderEllipse(painter, scale, style);
        break;
    }

    painter->restore();
}
Exemple #4
0
void LLNetMap::renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U &color, F32 radius_meters )
{
	LLVector3 local_pos;
	local_pos.setVec( pos - mObjectImageCenterGlobal );

	S32 diameter_pixels = llround(2 * radius_meters * mObjectMapTPM);
	renderPoint( local_pos, color, diameter_pixels );
}
Exemple #5
0
void BodyPart::render(SDL_Renderer *renderer)
{
	SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
	int x;
	int y;
	for(x=_xPos-2; x<=_xPos+2; x++)
		for(y=_yPos-2; y<=_yPos+2; y++)
			renderPoint(renderer, x, y);
}
Exemple #6
0
void LLNetMap::renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U &color, F32 radius_meters )
{
	LLVector3 local_pos;
	local_pos.setVec( pos - mObjectImageCenterGlobal );

	// DEV-17370 - megaprims of size > 4096 cause lag.  (go figger.)
	const F32 MAX_RADIUS = 256.0f;
	F32 radius_clamped = llmin(radius_meters, MAX_RADIUS);
	
	S32 diameter_pixels = llround(2 * radius_clamped * mObjectMapTPM);
	renderPoint( local_pos, color, diameter_pixels );
}
Exemple #7
0
void QgsMarkerSymbolLayerV2::drawPreviewIcon( QgsSymbolV2RenderContext& context, QSize size )
{
  startRender( context );
  renderPoint( QPointF( size.width() / 2, size.height() / 2 ), context );
  stopRender( context );
}
Exemple #8
0
// unsere redering funktion
GLvoid display ( GLvoid )   
{
	
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);		
	
	glLoadIdentity();


    


    

   	// Objekt drehen und bewegen
	glTranslatef(posx,posy,posz);
    glRotatef(rotx, 0.0f, 1.0f, 0.0f);
	glRotatef(roty, 1.0f, 0.0f, 0.0f);
	glRotatef(225.0f, 0.0f, 0.0f, 1.0f);
   

    // licht setzen und anzeigen
    glPushMatrix();
    glRotatef(rotly, 1.0f, 0.0f, 0.0f);
    glRotatef(rotlx, 0.0f, 1.0f, 0.0f);
    float l[3]; 
    l[0] = (float)apoint.x; 
    l[1] = (float)apoint.y; 
    l[2] = (float)apoint.z;
    
    // lichtpunkt anzeigen
    glColor3f( 1.0f, 1.0f, 0.0f);
    glPointSize(6.0f);
    renderPoint(apoint);
    glLightfv(GL_LIGHT0, GL_POSITION, l);
    glPopMatrix();
    
    // bbox der datenpunkte anzeigen
    glColor3f( 0.0f, 1.0f, 0.0f);
    model->box->render();
  

  
    glEnable(GL_LIGHTING);
    
    // model anzeigen
    glColor3f( 1.0f, 1.0f, 1.0f);

    
    // off Daten anzeigen
    glPointSize(2.0f);		
	if (visModel) model->render();


    if(visFacesOpt) renderFaces(model2->faces);
    if(visFaces) renderFaces(modelNormal->faces);   
    
    glDisable(GL_LIGHTING);

    glColor3f( 1.0f, 1.0f, 1.0f);
    
    if(visEdgesOpt) renderEdges(model2->edges, number);
    if(visEdges) renderEdges(modelNormal->edges, number);  
    
    //KD-tree anzeigen
    if(visStruktur)
    {
        glDisable(GL_DEPTH_TEST);
        model->visStructure();
        glEnable(GL_DEPTH_TEST);
    }
    
    
    
	// daten raus "spülen" ;) und back/front buffer swappen
	glFlush();
	glutSwapBuffers ( );
	
	

}