This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Usage instructions: lein run fontname.ttf 16 0x000000 | |
| ;; change fontname.ttf to a font file's name, 16 to the font size you want, and 0x000000 to a color in RGB format. | |
| (ns fontstuff.core | |
| (:use [clojure.string :only [join trim split]]) | |
| (:import [java.awt Font Graphics2D RenderingHints Color Rectangle Shape FontMetrics] | |
| [java.awt.font FontRenderContext GlyphVector TextLayout] | |
| [java.awt.image BufferedImage] | |
| [java.awt.geom Rectangle2D] | |
| [java.io File] | |
| [javax.imageio ImageIO]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package commanders.unite.utils | |
| import com.badlogic.gdx.graphics.Camera; | |
| import com.badlogic.gdx.graphics.OrthographicCamera; | |
| import com.badlogic.gdx.utils.viewport.Viewport | |
| ; | |
| /** | |
| * Created by Tommy Ettinger on 8/1/2014. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn diff [l1 l2] | |
| (let [a (group-by identity l1) | |
| b (group-by identity l2)] | |
| (mapcat #(repeat | |
| (- | |
| (count (second %)) | |
| (count (get b (key %)))) | |
| (key %)) | |
| a))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns pixmappery.core | |
| (:require [play-clj.core :refer :all] | |
| [play-clj.entities :as e] | |
| [play-clj.g2d :refer :all] | |
| [play-clj.ui :refer :all]) | |
| (:import [com.badlogic.gdx.graphics.g2d Batch SpriteBatch] | |
| [com.badlogic.gdx.graphics.glutils ShaderProgram])) | |
| (defn vert [] "attribute vec4 a_position; | |
| attribute vec4 a_color; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class AndroidMiniFormatter implements MiniFormatter { | |
| public static String format(final String formatString, final Object... args) { | |
| return String.format(formatString, args); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1 | |
| stack: [1] //data, integer 1 | |
| 1 + | |
| stack: [(+ 1 _)] //curried function that will await an argument and add 1 to it | |
| 1 + 2 | |
| stack: [3] //argument has been supplied to an awaiting function, function is evaluated | |
| //with full set of args | |
| 1 + 2 * | |
| stack: [(* 3 _)] //another curried function that will await an argument and multiply it by 3 | |
| 1 + 2 * [# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ┌───────────────┐ | |
| ┌─┘ . . . . . . . └─┐ | |
| ┌───┬───┐ ┌─────┐ ┌───┐ ┌─────┐ │ . . . . . . . . . │ | |
| ┌───────┘ ~ │ . └─┬─┘ . . └─┐ ┌───────────┘ . └─────┘ . . └───┐ │ . . . . . . . . . │ | |
| ┌─┘ ~ ~ ~ ~ ~ , . . │ . . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ┌───────────────────────────┐ | |
| ┌─┘ . . . . . . . . . . ^ . . └─┐ ┌───┐ ┌─────────────────┐ | |
| │ . . . . . . . . . . . . . . . │ ┌───────┘ . └───────┐ │ . . . . . . . . │ | |
| └─┐ . . . . . . . . . ^ . . . ┌─┘ ┌─┘ . . . . . . . . . └─┐ │ . . . . . . . . │ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ┌───────┬───────────────────────┐ ┌───────────────────────┐ | |
| ┌─┘ . . . │ . . . . . . . . . . . └─┐ │ . . . . > . . . . . . │ | |
| │ . . . . . . . . . . . . . . . . . └─┐ │ . . . . . . . . . . . │ | |
| │ . . . . . . . . . . . . . . . . . > │ │ . . . . . . . . . . . │ | |
OlderNewer