Exemplo n.º 1
0
static VALUE
cr_copy_page (VALUE self)
{
  cairo_copy_page (_SELF);
  cr_check_status (_SELF);
  return self;
}
Exemplo n.º 2
0
void ofCairoRenderer::viewport(float x, float y, float width, float height, bool invertY){
	if(width == 0) width = ofGetWidth();
	if(height == 0) height = ofGetHeight();

	if (invertY){
		y = ofGetHeight() - (y + height);
	}

	cairo_surface_flush(surface);
	viewportRect.set(x, y, width, height);
	if(page==0 || !multiPage){
		page=1;
	}else{
		page++;
		if(bClearBg()){
			cairo_show_page(cr);
		}else{
			cairo_copy_page(cr);
		}
	}
	cairo_reset_clip(cr);
	cairo_new_path(cr);
	cairo_move_to(cr,viewportRect.x,viewportRect.y);
	cairo_line_to(cr,viewportRect.x+viewportRect.width,viewportRect.y);
	cairo_line_to(cr,viewportRect.x+viewportRect.width,viewportRect.y+viewportRect.height);
	cairo_line_to(cr,viewportRect.x,viewportRect.y+viewportRect.height);
	cairo_clip(cr);
};
static PyObject *
pycairo_copy_page (PycairoContext *o)
{
    cairo_copy_page (o->ctx);
    if (Pycairo_Check_Status (cairo_status (o->ctx)))
	return NULL;
    Py_RETURN_NONE;
}
Exemplo n.º 4
0
static PyObject *
pycairo_copy_page (PycairoContext *o) {
  Py_BEGIN_ALLOW_THREADS;
  cairo_copy_page (o->ctx);
  Py_END_ALLOW_THREADS;
  RETURN_NULL_IF_CAIRO_CONTEXT_ERROR(o->ctx);
  Py_RETURN_NONE;
}
Exemplo n.º 5
0
void ofCairoRenderer::update(){
	cairo_surface_flush(surface);
	if(page==0 || !multiPage){
		page=1;
	}else{
		page++;
		if(bClearBg()){
			cairo_show_page(cr);
		}else{
			cairo_copy_page(cr);
		}
	}
	ofSetStyle(ofGetStyle());
}
void ofCairoRenderer::startRender(){
	if(!surface || !cr)
		setStyle(currentStyle);
	if(page==0 || !multiPage){
		page=1;
	}else{
		page++;
		if(getBackgroundAuto()){
			cairo_show_page(cr);
			clear();
		}else{
			cairo_copy_page(cr);
		}
	}
}
Exemplo n.º 7
0
void ofCairoRenderer::update(){
	if(!surface || !cr)
	setStyle(ofGetStyle());
	cairo_surface_flush(surface);
	if(page==0 || !multiPage){
		page=1;
	}else{
		page++;
		if(getBackgroundAuto()){
			cairo_show_page(cr);
			clear();
		}else{
			cairo_copy_page(cr);
		}
	}
}
Exemplo n.º 8
0
	void lime_cairo_copy_page (value handle) {
		
		cairo_copy_page ((cairo_t*)val_data (handle));
		
	}
Exemplo n.º 9
0
	void lime_cairo_copy_page (double handle) {
		
		cairo_copy_page ((cairo_t*)(intptr_t)handle);
		
	}
Exemplo n.º 10
0
void Context::copyPage()
{
	cairo_copy_page( mCairo );
}