91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 3KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-08
  • 語言: Java
  • 標簽: Android??涂鴉??

資源簡介

這份源碼實現的是Android圖片編輯中出現的在圖片上涂鴉的的功能,Edit_bitmap為傳遞到該界面的參數

資源截圖

代碼片段和文件信息

package?com.example.jump;

import?android.app.Activity;
import?android.content.Context;
import?android.content.Intent;
import?android.graphics.Bitmap;
import?android.graphics.Bitmap.Config;
import?android.graphics.Canvas;
import?android.graphics.Color;
import?android.graphics.Paint;
import?android.graphics.Path;
import?android.os.Bundle;
import?android.util.DisplayMetrics;
import?android.view.MotionEvent;
import?android.view.View;
import?android.view.View.onclickListener;
import?android.widget.Button;
import?android.widget.LinearLayout;
import?android.widget.SeekBar;
import?android.widget.SeekBar.OnSeekBarChangeListener;

public?class?ScrawlActivity?extends?Activity?{
/**?Called?when?the?activity?is?first?created.?*/

private?Paint?mPaint=null;
private?LinearLayout?linear=null;
private?TouchView?touchView=null;

private?Button?clearButton=null;
private?Button?confirmButton=null;
private?Button?cancelButton=null;
private?Button?colorview=null;
private?Button?[]colorButton=null;

private?final?int?colorcount=7;
private?int?COUNT=0;
private?SeekBar?mseekBar=null;
private?int?[]colorArray={Color.YELLOWColor.BLACKColor.WHITEColor.GREENColor.GRAYColor.REDColor.BLUE};
DisplayMetrics?dm?=?new?DisplayMetrics();

int?screenwidth?=?0;
int?screenheight?=0;?
?@Override
public?void?onCreate(Bundle?savedInstanceState)?{

super.onCreate(savedInstanceState);
setContentView(R.layout.scrawl);

getWindowManager().getDefaultDisplay().getMetrics(dm);
screenwidth?=?(int)(dm.widthPixels);
screenheight?=?(int)(dm.heightPixels);?

confirmButton=(Button)findViewById(R.id.confirm);
????cancelButton=(Button)findViewById(R.id.cancel);
????clearButton=(Button)findViewById(R.id.clear);
????linear?=?(LinearLayout)?findViewById(R.id.linear);
????colorButton=new?Button[colorcount];
int?[]colorButtonID={R.id.yellowR.id.blackR.id.whiteR.id.greenR.id.grayR.id.redR.id.blue};
colorview=(Button)findViewById(R.id.color);
colorview.setBackgroundColor(Color.RED);
for(int?i=0;i colorButton[i]=(Button)findViewById(colorButtonID[i]);
colorButton[i].setBackgroundColor(colorArray[i]);
}

mPaint?=?new?Paint();
mPaint.setAntiAlias(true);
mPaint.setDither(true);
mPaint.setColor(Color.GREEN);
mPaint.setstyle(Paint.style.STROKE);
mPaint.setStrokeJoin(Paint.Join.ROUND);
mPaint.setStrokeCap(Paint.Cap.ROUND);
mPaint.setStrokeWidth(2);

mseekBar=(SeekBar)findViewById(R.id.mseekBar);
mseekBar.setMax(30);
mseekBar.setProgress(15);
for(int?i=0;i colorButton[i].setonclickListener(new?View.onclickListener()?{
???????? private?int?colors=colorArray[COUNT];
public?void?onclick(View?v)?{
//?TODO?Auto-generated?method?stub
mPaint.setColor(colors);
colorview.setBackgroundColor(colors);
}
});
COUNT++;
}
mseekBar.setOnSeekBarChangeListener(new?OnSeekBarChangeListener()?{
@Override
public?void?onProgressChanged(
SeekBar?seekBar
int?prog

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????4074??2012-07-29?18:44??scrawl.xml

?????文件???????1291??2012-07-29?16:24??strings.xml

?????文件???????6242??2012-07-29?18:44??ScrawlActivity.java

-----------?---------??----------?-----??----

????????????????11607????????????????????3


評論

共有 條評論