Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Thinking ahead paid off

Thinking ahead paid off

Scheduled Pinned Locked Moved The Lounge
2 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • honey the codewitchH Offline
    honey the codewitchH Offline
    honey the codewitch
    wrote on last edited by
    #1

    Over a year ago I made a funny function to take a rectangle (x1,y1,x2,y2) and "split" it by another rectangle, to yield up to 4 resulting rectangles by punching a second rectangle shaped hole in the first rectangle. I thought it might be useful someday. Today I used it. I was optimizing battery life for a remote I built, so I wanted to minimize the amount I was communicating to the display on it. I used this spit() function to knock out areas that were to be replaced with dynamically rendered bits so that when I rendered the background I wasn't rendering any area that would later be drawn to anyway. Ergo, I am never painting the same pixel twice. Woo! I feel smart right now. :-\

    To err is human. Fortune favors the monsters.

    T 1 Reply Last reply
    0
    • honey the codewitchH honey the codewitch

      Over a year ago I made a funny function to take a rectangle (x1,y1,x2,y2) and "split" it by another rectangle, to yield up to 4 resulting rectangles by punching a second rectangle shaped hole in the first rectangle. I thought it might be useful someday. Today I used it. I was optimizing battery life for a remote I built, so I wanted to minimize the amount I was communicating to the display on it. I used this spit() function to knock out areas that were to be replaced with dynamically rendered bits so that when I rendered the background I wasn't rendering any area that would later be drawn to anyway. Ergo, I am never painting the same pixel twice. Woo! I feel smart right now. :-\

      To err is human. Fortune favors the monsters.

      T Offline
      T Offline
      Tomaz Stih 0
      wrote on last edited by
      #2

      It can be used in many ways. Here's my little Windows for 8bit machine doc, check page 9. :) yx/yx-buddy.pdf at master · tstih/yx · GitHub[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups