簡體   English   中英

使用UnfoldingMaps繪制到PGraphics

[英]Using UnfoldingMaps to draw to PGraphics

我想使用展開貼圖寫入處理中的PGraphics。

import de.fhpotsdam.unfolding.*;
import de.fhpotsdam.unfolding.geo.*;
import de.fhpotsdam.unfolding.utils.*; 
import de.fhpotsdam.unfolding.providers.*;

UnfoldingMap map;
PGraphics g;

void setup() {
    size(800, 600);
    map= new UnfoldingMap(this, new OpenStreetMap.OpenStreetMapProvider( ));
    map.zoomAndPanTo(new Location(52.5f, 13.4f), 10);    
    g = createGraphics(width, height);
}

void draw() {
    map.draw();
    g.beginDraw();
    //g.map.draw();no
    //map.draw(g);nope
    g.endDraw();
}

map.draw()如何將此打印輸出到緩沖區g

不是最直接的,但目前的做法是

g.image(map.mapDisplay.getOuterPG().get(), 0, 0);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM