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
// | |
// Android ライブ壁紙 Drawable 描画用 あれこれサンプル | |
// | |
/**================================== | |
* R.java から Drawable取得 | |
*/ | |
// 取得 | |
private Drawable _image; | |
_image = r.getDrawable(R.drawable.image0); |
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
//四捨五入 | |
BigDecimal origin = new BigDecimal(f); | |
BigDecimal res = origin.setScale(0,BigDecimal.ROUND_HALF_UP); | |
result = res.shortValue(); | |
or | |
Math.round(f); |
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
/** | |
ex) | |
<string-array name="entries0"> | |
<item>値1</item> | |
<item>値2</item> | |
<item>値3</item> | |
<item>値4</item> | |
</string-array> | |
*/ | |
String[] array =getResources().getStringArray(R.array.entries0); |
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 ArrayList<Bitmap> split(Drawable drawable, int width, int height) | |
{ | |
// 縦長Drawableをビットマップに | |
Bitmap bitmapOrg = ((BitmapDrawable) drawable).getBitmap(); | |
//分割bitmapにして配列に保存 | |
int masterHeight = bitmapOrg.getHeight(); | |
int max = masterHeight / 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
//Resource → Bitmap | |
BitmapFactory.decodeResource(getResources(), R.drawable.icon); | |
//Resource → Drawable | |
getResources().getDrawable(R.drawable.icon); | |
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
// =================================================== | |
// 指定連番画像を読み込んで縦長に並べるphotoshop 用 js | |
// | |
// - customize from "Load Files into Stack.js" | |
// - customize from tatsuaki.net ぐりぐり写真用 Photoshop自動化javascript | |
// | |
//=================================================== | |
// (c) Copyright 2006. Adobe Systems, Incorporated. All rights reserved. |
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
/** | |
*============================================================ | |
* copyright(c) 2011 www.itoz.jp | |
* @author itoz | |
*============================================================ | |
*/ | |
package jp.itoz.display | |
{ | |
import flash.display.Sprite; | |
import flash.display.Shape; |
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
package | |
{ | |
import flash.display.Bitmap; | |
import flash.display.BitmapData; | |
import flash.display.Loader; | |
import flash.display.Sprite; | |
import flash.events.Event; | |
import flash.events.TimerEvent; | |
import flash.net.URLRequest; | |
import flash.system.LoaderContext; |
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
<project name="build desktop captive runtime" default="build"> | |
<property name="adt" value="[adtのパス]" /> | |
<property name="cirtificate" value="[さーてぃふぃけいとパス]" /> | |
<property name="cirtificate.pass" value="[ぱすわーど]" /> | |
<target name="build"> | |
<java jar="${adt}" fork="true"> |
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
//*********************************************** | |
// | |
// TRG_LENG値の正方形に収まるようにpsdをリサイズするjsx | |
// author itoz (www.romatica.com) | |
// | |
//*********************************************** | |
var TRG_LENG = 60; |