Changed chip layout to use SVGs

This commit is contained in:
trebonian 2012-01-31 22:58:22 -05:00
parent de265ecdb8
commit ae185ff06b
4 changed files with 18 additions and 8 deletions

2
6502N.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 2.6 MiB

View File

@ -72,7 +72,7 @@ More information in the <a href="http://visual6502.org/wiki/index.php?title=Jssi
</span> </span>
<div class="frame" id="frame"> <div class="frame" id="frame">
<div class="chip" id="chip"> <div class="chip" id="chip">
<canvas class="chip" id="chipbg"></canvas> <object data="6502N.svg" type="image/svg+xml" id="chipbg" style="position: absolute; width: 600px; height:600px;"></object>
<canvas class="chip" id="overlay"></canvas> <canvas class="chip" id="overlay"></canvas>
<canvas class="chip" id="hilite"></canvas> <canvas class="chip" id="hilite"></canvas>
<canvas class="chip" id="hitbuffer"></canvas> <canvas class="chip" id="hitbuffer"></canvas>

View File

@ -50,6 +50,13 @@ canvas.chip {
height: 600px; height: 600px;
} }
object.chipbg {
position: absolute;
width: 600px;
height: 600px;
}
div.buttons{ div.buttons{
position: absolute; position: absolute;
top: -5px; top: -5px;

View File

@ -73,8 +73,9 @@ function setupLayerVisibility(){
function setupBackground(){ function setupBackground(){
chipbg = document.getElementById('chipbg'); chipbg = document.getElementById('chipbg');
chipbg.width = grCanvasSize; chipbg.width = 4000;
chipbg.height = grCanvasSize; chipbg.height = 4000;
return;
var ctx = chipbg.getContext('2d'); var ctx = chipbg.getContext('2d');
ctx.fillStyle = '#000000'; ctx.fillStyle = '#000000';
ctx.strokeStyle = 'rgba(255,255,255,0.5)'; ctx.strokeStyle = 'rgba(255,255,255,0.5)';
@ -137,10 +138,10 @@ function hexdigit(n){return '0123456789ABCDEF'.charAt(n);}
function refresh(){ function refresh(){
if(!chipLayoutIsVisible) return; if(!chipLayoutIsVisible) return;
ctx.clearRect(0,0,grCanvasSize,grCanvasSize); // ctx.clearRect(0,0,grCanvasSize,grCanvasSize);
for(i in nodes){ // for(i in nodes){
if(isNodeHigh(i)) overlayNode(nodes[i].segs); // if(isNodeHigh(i)) overlayNode(nodes[i].segs);
} // }
hiliteNode(hilited); hiliteNode(hilited);
} }