// // send ofPolyline to laser cutter // bool ofxEpilog::send(ofPolyline vector_vertexes) { if(vector_vertexes.size() == 0) return false; ofBuffer buffer; buffer.append(createPayloadHeader(getMachineProfile(), getOutputConfig())); // end raster part regardless of it's empty buffer.append(PCL_RASTER_END); // begin HPGL commands (vector part) buffer.append(HPGL_START); buffer.append(HPGL_VECTOR_INIT + HPGL_CMD_DELIMITER); // create vector part and append to the buffer buffer.append(createPayloadVectorBody(vector_vertexes, getOutputConfig())); if(!keep_alive) buffer.append(createPayloadFooter()); // end the session if(pjl_file.get() != NULL) pjl_file->writeFromBuffer(buffer); return tcp_client.sendRaw(buffer); }
void GMAudioPlayer::saveSettings() { OutputConfig config; getOutputConfig(config); FXSettings settings; config.save(settings); settings.unparseFile(GMApp::getConfigDirectory(true)+PATHSEPSTRING+"gap.conf"); }
int main() { if (getOutputConfig()) { printf("The Little Prince\n"); } return 0; }
ofBuffer ofxEpilog::createPayloadCombinedBody(ofImage raster_img, ofPolyline vector_vertexes) { if(!raster_img.isAllocated()) return; if(vector_vertexes.size() == 0) return; ofBuffer buffer; buffer.append(createPayloadRasterBody(raster_img, getOutputConfig())); // end raster part regardless of it's empty buffer.append(PCL_RASTER_END); // begin HPGL commands (vector part) buffer.append(HPGL_START); buffer.append(HPGL_VECTOR_INIT + HPGL_CMD_DELIMITER); buffer.append(createPayloadVectorBody(vector_vertexes, getOutputConfig())); return buffer; }
bool ofxEpilog::send(ofImage img, int w_mm, int h_mm) { // // TODO([email protected]): finish implementation // if(!img.isAllocated()) return false; if(w_mm <= 0 || h_mm <= 0) return false; ofLog(OF_LOG_WARNING) << "bool ofxEpilog::send(ofImage img, int w_mm, int h_mm) is not implemented yet."; return false; // // dummy implementation // ofBuffer buffer; buffer.append(createPayloadHeader(getMachineProfile(), getOutputConfig())); // create raster part buffer.append(createPayloadRasterBody(img, getOutputConfig())); // end raster part regardless of it's empty buffer.append(PCL_RASTER_END); // begin HPGL commands (vector part) buffer.append(HPGL_START); buffer.append(HPGL_VECTOR_INIT + HPGL_CMD_DELIMITER); if(!keep_alive) buffer.append(createPayloadFooter()); // end the session if(pjl_file.get() != NULL) pjl_file->writeFromBuffer(buffer); return tcp_client.sendRaw(buffer); }