Example #1
0
import pickle
import random

from Examples import nrnoble as Util
from Library import GRCGraphics as GRC

windowWidth = 502
windowHeight = 268
interval = .1
Color = random.choice(Util.Colors)
gWindow1 = GRC.GraphicsWindow("Image Window-1", windowWidth, windowHeight)
gWindow2 = GRC.GraphicsWindow("Image Window-2", windowWidth, windowHeight)

#background1 = GRC.Image(GRC.Point(251, 134), "E:\\Data\\Github\\GRC1\\Content\\bwdock.png")
background1 = GRC.Image(GRC.Point(251, 134),
                        "E:\\Data\\Github\\GRC1\\Content\\icecave.png")
background2 = GRC.Image(GRC.Point(251, 134), ".\\Content\\blackbackground.png")


def main():

    background1.draw(gWindow1)
    background2.draw(gWindow2)
    # gWindow1.redraw()
    # gWindow2.redraw()
    pixels = []

    for y in range(0, windowHeight - 3):
        for x in range(0, windowWidth):
            red, green, blue = background1.getPixel(x, y)
            rgb = color_rgb(red, green, blue)
Example #2
0
import random

from Library import GRCGraphics as GRC
from Library.Examples import nrnoble as Util

windowWidth = 502
windowHeight = 268
interval = .1
Color = random.choice(Util.Colors)
gWindow1 = GRC.GraphicsWindow("Image Window-1", windowWidth, windowHeight)
gWindow2 = GRC.GraphicsWindow("Image Window-2", windowWidth, windowHeight)

#background1 = GRC.Image(GRC.Point(251, 134), "E:\\Data\\Github\\GRC1\\Content\\bwdock.png")
# background1 = GRC.Image(GRC.Point(251, 134), "E:\\Data\\Github\\GRC1\\Content\\icecave.png")
background2 = GRC.Image(GRC.Point(251, 134), ".\\Content\\blackbackground.png")


def main():

    filepath = '.\\Content\\randomColors.pkle'

    #background1.draw(gWindow1)
    background2.draw(gWindow2)
    # gWindow1.redraw()
    # gWindow2.redraw()
    pixels = []

    for y in range(0, windowHeight - 3):
        for x in range(0, windowWidth):
            # red, green, blue = background1.getPixel(x,y)
            red = random.randint(0, 255)
Example #3
0
    os.path.dirname(
        os.path.dirname(
            os.path.abspath(inspect.getfile(inspect.currentframe())))))
import nrnoble as Util
from Library import GRCGraphics as GRC

windowWidth = 502
windowHeight = 268
interval = .1
Color = random.choice(Util.Colors)
gWindow1 = GRC.GraphicsWindow("Image Window-1", windowWidth, windowHeight)
#gWindow2 = GRC.GraphicsWindow("Image Window-2", windowWidth, windowHeight)

# background1 = GRC.Image(GRC.Point(251, 134), "E:\\Data\\Github\\GRC1\\Content\\bwdock.png")
# background2 = GRC.Image(GRC.Point(251, 134), ".\\Content\\blackbackground.png")
background2 = GRC.Image(GRC.Point(251, 134),
                        "..\\Content\\randomPixelsbackground3.png")
#background2 = GRC.Image(GRC.Point(251, 134), "E:\\Data\\Github\\GRC1\\Content\\randomPixelsbackground3.png")


def main():

    # background1.draw(gWindow1)
    background2.draw(gWindow1)
    # gWindow1.redraw()
    # gWindow2.redraw()
    pixels = []

    # for y in range(0,windowHeight -  3):
    #     for x in range (0,windowWidth):
    #         red, green, blue = background1.getPixel(x,y)
    #         rgb = color_rgb(red, green, blue)