Skip to content

Commit

Permalink
CWT TextOnText - Cleanup Step
Browse files Browse the repository at this point in the history
- Cleaned up a lot of old comments [J/JS]
- Added GIF stuff [J]
- Updated Img README
  • Loading branch information
ctomni231 committed Jan 2, 2021
1 parent 0b767f1 commit 8edc12e
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 529 deletions.
14 changes: 2 additions & 12 deletions engine/js/jslix.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
* JSlix Image Engine
*
* Currently:
* Font and Text - Need to work on \n paragraph functionality
* Font and Text - Need to notice captial and common letters in charts
* Font and text - After \n, need to create max width (by adding \n to text) when over a pixel width
* Font and text - After \n, Need to create max lines, which will cut paragraphs
*
* Future: Might need to modularize this a bit (Deprecated)
Expand Down Expand Up @@ -638,10 +635,6 @@ export function getRef(name){
// Draw Functions
// -------------------------------------------

//void ctx.drawImage(image, dx, dy);
//void ctx.drawImage(image, dx, dy, dWidth, dHeight);
//void ctx.drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight);

// This function places an image on a destination screen
export function placeImg(ctx, num, dlx, dly){
ctx.drawImage(getImg(num), dlx, dly);
Expand Down Expand Up @@ -721,7 +714,6 @@ export function drawCutImg(ctx, num, dlx, dly, dsx, dsy, slx, sly, ssx, ssy){
ctx.drawImage(getImg(num), slx, sly, ssx, ssy, dlx, dly, dsx, dsy);
}


// -------------------------------------------
// Remove functions
// -------------------------------------------
Expand Down Expand Up @@ -1050,9 +1042,8 @@ function storeImage(){
}

// This allows Safari to reenact onload functionality
if(imgStorage){
if(imgStorage)
imgStorage.parentNode.removeChild(imgStorage);
}

let imgData = ctx.getImageData(0, 0, canvas.width, canvas.height);
let imgWidth = canvas.width;
Expand Down Expand Up @@ -1119,9 +1110,8 @@ function storeImage(){
}

// This allows Safari to reenact onload functionality
//if(imgStorage){
//if(imgStorage)
// imgStorage.parentNode.removeChild(imgStorage);
//}

// Used to store things on the colormap (Have to do it after manipulations)
if(jslix.mapArray.shift() == 1){
Expand Down
Loading

0 comments on commit 8edc12e

Please sign in to comment.