我使用androidplot與PanZoom附:Androidplot繪製圓,給點和半徑
PanZoom.attach(plot);
因此我可以放大和縮小,因爲它應該。
我要的未來是在給定的點畫圓。 現在我使用strokewidth來設置圓的尺寸。 但是,當我放大和縮小時,圓的大小保持不變,儘管它應根據縮放級別進行縮放。所以想象我無限放大,圓圈應該以一定的縮放級別覆蓋整個屏幕。
但事實並非如此。 我該如何做到這一點? 我想阿博德根據縮放級別增加圓的strokewidth,但我既不是能夠得到縮放級別,也沒有得到對劇情的左側和右側的域名級別。
編輯: 在XML文件夾中創建一個文件,例如circle.xml:
<?xml version="1.0" encoding="utf-8"?>
<config
fillPaint.color="#00000000"
linePaint.color="#00000000"
linePaint.strokeWidth="0dp"
pointLabelFormatter.textPaint.color="#FFFFFF"
vertexPaint.color="#371cd1d4"
vertexPaint.strokeWidth="20dp"/>
,並在Java
sigmaLabelFormatter = new LineAndPointFormatter();
sigmaLabelFormatter.setPointLabelFormatter(new PointLabelFormatter());
sigmaLabelFormatter.configure(activity.getApplicationContext(), R.xml.circle);
sigmaLabelFormatter.setPointLabelFormatter(null);
什麼是你創建的圈子代碼? – Danieboy