Search Results

Search found 2 results on 1 pages for 'udim'.

Page 1/1 | 1 

  • Why do my LWJGL fonts have dots and lines around them?

    - by Jordan
    When we render fonts there are weird dots and lines around the text. I have no idea why this would happen. Here is an image of what it looks like: Our font class looks like this: package me.NJ.ComputerTycoon.Font; import me.NJ.ComputerTycoon.BaseObjects.UDim2; import org.lwjgl.opengl.Display; import org.newdawn.slick.Color; import org.newdawn.slick.TrueTypeFont; public class Font { public TrueTypeFont font; private int fontSize = 18; private String fontName = "Calibri"; private int fontStyle = java.awt.Font.BOLD; public Font(String fontName, int fontStyle, int fontSize) { font = new TrueTypeFont(new java.awt.Font(fontName, fontStyle, fontSize), true); //font. } public Font(int fontStyle, int fontSize) { font = new TrueTypeFont(new java.awt.Font(fontName, fontStyle, fontSize), true); } public Font(int fontSize) { font = new TrueTypeFont(new java.awt.Font(fontName, fontStyle, fontSize), true); } public Font() { font = new TrueTypeFont(new java.awt.Font(fontName, fontStyle, fontSize), true); } public void drawString(int x, int y, String s, Color color){ this.font.drawString(x, y, s, color); } public void drawString(int x, int y, String s){ this.font.drawString(x, y, s); } public void drawString(float x, float y, String s, Color color){ this.font.drawString(x, y, s, color); } public void drawString(float x, float y, String s){ this.font.drawString(x, y, s); } public void drawString(UDim2 udim, String s){ this.font.drawString((Display.getWidth() * udim.getX().getScale()) + udim.getX().getOffset(), (Display.getHeight() * udim.getY().getScale()) + udim.getY().getOffset(), s); } public String getFontName(){ return this.fontName; } public int getFontSize(){ return this.fontSize; } public TrueTypeFont getFont(){ return this.font; } } What could be causing this?

    Read the article

  • Problem with Initializing Consts

    - by UdiM
    This code, when compiled in xlC 8.0 (on AIX 6.1), produces the wrong result. It should print 12345, but instead prints 804399880. Removing the const in front of result makes the code work correctly. Where is the bug? #include <stdio.h> #include <stdlib.h> #include <string> long int foo(std::string input) { return strtol(input.c_str(), NULL, 0); } void bar() { const long int result = foo("12345"); printf("%u\n", result); } int main() { bar(); return 0; } Compilation command: /usr/vacpp/bin/xlC example.cpp -g

    Read the article

1