openframeworks / openframeworks/openFrameworks

blendmodes do not save from ofCairoRenderer?

Open
#7,339 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

The blend modes look good on screen but is not saved to PDF or SVG.

//--------------------------------------------------------------
void ofApp::draw(){
	ofBackground(ofColor(255,255,255));

	if (saveVector) {
		ofBeginSaveScreenAsPDF("blendMode_test.pdf", false);
	}

	ofEnableBlendMode(OF_BLENDMODE_MULTIPLY);
	ofSetColor(ofColor(80,40,255));
	ofDrawRectangle(0,0,100,100);
	ofDrawRectangle(50, 50, 100, 100);

	if (saveVector) {
		ofEndSaveScreenAsPDF();
		saveVector = false;
	}
}

//--------------------------------------------------------------
void ofApp::keyPressed(int key){
	if (key == OF_KEY_DOWN) {
		saveVector = true;
	}
}

Screenshot

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the supplied example with ofCairoRenderer and the ofBeginSaveScreenAsPDF/ofEndSaveScreenAsPDF entry points, comparing the on-screen result with the generated PDF and SVG. Done means OF_BLENDMODE_MULTIPLY is preserved in both vector outputs, matching the screen rendering.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.