This file contains 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
import javax.microedition.midlet.*; | |
import javax.microedition.lcdui.*; | |
import java.io.IOException; | |
// Affine | |
public class Affine2 extends MIDlet | |
{ | |
public Affine2() |
This file contains 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
import javax.microedition.midlet.*; | |
import javax.microedition.lcdui.*; | |
import java.io.IOException; | |
// Affine | |
public class Affine4 extends MIDlet | |
{ | |
public Affine4() |
This file contains 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
// PixelData.java | |
import javax.microedition.lcdui.*; | |
public class PixelData { | |
private int[] pixels; | |
private int width; | |
private int height; | |
private PixelData(int[] pixels, int width, int height) |
This file contains 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 int getPixelBilinear(double x, double y) | |
{ | |
// 座標値を画像の中に収める | |
if (x < 0) x = 0.0; | |
if (x >= this.getWidth()) x = this.getWidth() - 1.0; | |
if (y < 0) y = 0.0; | |
if (y >= this.getHeight()) y = this.getHeight() - 1.0; | |
int x1 = (int)x; // x - x1 == p | |
int y1 = (int)y; // y - y1 == q |
This file contains 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
// PixelData.java | |
import javax.microedition.lcdui.*; | |
public class PixelData { | |
private int[] pixels; | |
private int width; | |
private int height; | |
private PixelData(int[] pixels, int width, int height) |
This file contains 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
// keyCode の種類 | |
// --------------------- | |
// Canvas.KEY_NUM0 0 | |
// Canvas.KEY_NUM1 1 | |
// : : | |
// Canvas.KEY_NUM9 9 | |
// Canvas.KEY_POUND # | |
// Canvas.KEY_STAR * | |
// | |
// getGameAction(keyCode) の種類 |
This file contains 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
Sub HVCentering() | |
' 水平垂直センタリング | |
' | |
With Selection | |
.HorizontalAlignment = xlCenter | |
.VerticalAlignment = xlCenter | |
End With | |
End Sub |
This file contains 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
require 'rake/clean' | |
require 'rake/testtask' | |
STAGE_DIR = '.stage' | |
CLEAN.include '*.o' | |
CLEAN.include '*.so' | |
CLEAN.include STAGE_DIR | |
EXTCONF_LIST = FileList['ext/**/extconf.rb'].map{|x| x.sub(%r!^ext/!, '') } |
This file contains 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
#! /usr/bin/env ruby | |
# coding: utf-8 | |
require 'webrick' | |
require 'Win32API' | |
require 'rubygems' | |
require 'rack' | |
require 'sinatra' | |
set :run, false |
This file contains 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
#! /usr/bin/env ruby | |
# coding: utf-8 | |
require 'Win32API' | |
require 'rubygems' | |
require 'rack' | |
require 'sinatra' | |
set :run, false |