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>
<div class="frame" id="frame">
<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="hilite"></canvas>
<canvas class="chip" id="hitbuffer"></canvas>

View File

@ -50,6 +50,13 @@ canvas.chip {
height: 600px;
}
object.chipbg {
position: absolute;
width: 600px;
height: 600px;
}
div.buttons{
position: absolute;
top: -5px;
@ -91,4 +98,4 @@ table.memtable {
#title {
font-size:30px;
font-weight:bold;
}
}

View File

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