<commit_before>#!/usr/bin/python
# $Id:$

from pyglet.gl import *

def draw_client_border(window):
    glClearColor(0, 0, 0, 1)
    glClear(GL_COLOR_BUFFER_BIT)
    glPolygonMode(GL_FRONT_AND_BACK, GL_LINE)

    glMatrixMode(GL_PROJECTION)
    glLoadIdentity()
    glOrtho(0, window.width, 0, window.height, -1, 1)

    glMatrixMode(GL_MODELVIEW)
    glLoadIdentity()
    def rect(x1, y1, x2, y2):
        glBegin(GL_POLYGON)
        glVertex2f(x1, y1)
        glVertex2f(x2, y1)
        glVertex2f(x2, y2)
        glVertex2f(x1, y2)
        glEnd()
    
    glColor3f(1, 0, 0)
    rect(-1, -1, window.width, window.height)

    glColor3f(0, 1, 0)
    rect(0, 0, window.width - 1, window.height - 1)
<commit_msg>Issue 76: more consistent rasterisation for window tests.<commit_after>#!/usr/bin/python
# $Id:$

from pyglet.gl import *

def draw_client_border(window):
    glClearColor(0, 0, 0, 1)
    glClear(GL_COLOR_BUFFER_BIT)

    glMatrixMode(GL_PROJECTION)
    glLoadIdentity()
    glOrtho(0, window.width, 0, window.height, -1, 1)

    glMatrixMode(GL_MODELVIEW)
    glLoadIdentity()
    def rect(x1, y1, x2, y2):
        glBegin(GL_LINE_LOOP)
        glVertex2f(x1, y1)
        glVertex2f(x2, y1)
        glVertex2f(x2, y2)
        glVertex2f(x1, y2)
        glEnd()
    
    glColor3f(1, 0, 0)
    rect(0, -1, window.width + 1, window.height)

    glColor3f(0, 1, 0)
    rect(1, 0, window.width, window.height - 1)

{'fraction_non_alphanumeric': 0.12432432432432433, 'fraction_numerical': 0.052702702702702706, 'mean_word_length': 2.476525821596244, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '896720', 'n_tokens_mistral': 648, 'n_tokens_neox': 593, 'n_words': 115}