精华内容
下载资源
问答
  • android 写字

    2021-01-06 13:32:05
    android 写字
  • android写字

    2017-06-09 13:31:43
    非常好用的android写字板的应用程序,可以直接运行,简单好用
  • android 写字板Rafael Rivera / Microsoft拉斐尔·里维拉(Rafael Rivera)/微软Microsoft can’t stop inserting advertisements into Windows 10. The latest experimental advertisement appears in WordPad. It’s...
    android 写字板

    android 写字板

    An ad for Word Online in Microsoft WordPad
    Rafael Rivera / Microsoft
    拉斐尔·里维拉(Rafael Rivera)/微软

    Microsoft can’t stop inserting advertisements into Windows 10. The latest experimental advertisement appears in WordPad. It’s a banner inviting you to use Office’s web apps instead of the included WordPad application.

    微软不能停止在Windows 10中插入广告。 最新的实验广告出现在写字板中。 它是一条横幅,邀请您使用Office的Web应用程序而不是随附的写字板应用程序。

    Rafael Rivera discovered the ads and revealed them on Twitter. There are several variants, but they all invite you to try Word, Excel, or PowerPoint online. There’s an “Open Word” or “Open Office” button that will open Microsoft’s Office web apps in your browser.

    拉斐尔·里维拉(Rafael Rivera)发现了这些广告,并在Twitter上进行了展示。 有几种变体,但是它们都邀请您在线尝试Word,Excel或PowerPoint。 有一个“ Open Word”或“ Open Office”按钮,将在浏览器中打开Microsoft的Office Web应用程序。

    BREAKSCLUSIVE: Microsoft WordPad is getting a new feature! An ad for Office web apps!

    BREAKSCLUSIVE:Microsoft写字板正在获得一项新功能! Office Web应用程序的广告!

    Screenshot shows 6 experimental variants.

    屏幕截图显示了6种实验变体。

    vso/tfs id 23834136variants 1-6 pic.twitter.com/TdYOuKkLZc

    VSO / TFS ID 23834136variants 1-6 pic.twitter.com/TdYOuKkLZc

    — Rafael Rivera (@WithinRafael) January 20, 2020

    -拉斐尔·里维拉(@WithinRafael) 2020年1月20日

    While ads in WordPad don’t feel great, they’re not totally crazy. Microsoft’s Office web apps are free—you just have to sign in with a Microsoft account—and some people trying WordPad might be happier with the Microsoft Word web app instead. They’re a capable alternative to Google Docs.

    虽然写字板中的广告感觉不佳,但并不完全是疯狂的。 Microsoft的Office Web应用程序是免费的-您只需要使用Microsoft帐户登录即可-某些尝试使用WordPad的人可能更喜欢Microsoft Word Web应用程序。 它们是Google文档的替代品。

    But, in spite of that rationale, this ad still feels out of place. Maybe this advertisement would feel more restrained if Microsoft hadn’t spent years pushing Candy Crush and subscription-based Solitaire to Windows 10 users.

    但是,尽管有这样的理由,但该广告仍然感觉不合适。 如果微软没有花费很多年Candy Crush基于订阅的纸牌推向Windows 10用户,也许这则广告会受到更大的限制。

    These ads aren’t actually part of the stable version of Windows 10 yet. They appear in some Insider Preview builds of Windows 10, and they’re not activated by default for most Insiders. Still, Microsoft is clearly experimenting with ads in WordPad, just as the company experimented with ads in Windows 10’s Mail app before backing down.

    这些广告实际上还不是Windows 10稳定版的一部分。 它们出现在Windows 10的某些Insider Preview版本中,并且对于大多数Insiders默认情况下都未激活。 尽管如此,微软显然仍在尝试使用写字板中的广告,就像该公司在退出之前在Windows 10的Mail应用中进行广告一样

    翻译自: https://www.howtogeek.com/519572/microsoft-is-testing-ads-in-wordpad-on-windows-10/

    android 写字板

    展开全文
  • Android仿写字板功能

    2017-09-27 13:48:12
    Android仿写字板功能Android仿写字板功能Android仿写字板功能Android仿写字板功能Android仿写字板功能Android仿写字板功能Android仿写字板功能Android仿写字板功能Android仿写字板功能Android仿写字板功能Android仿...
  • Android仿写字板功能 简单操作内存中的图像,对图像进行简单的处理,绘制直线,以达到写字板的效果
  • Android画板控件,可以写字画画并生成图片
  • Android画圆、画矩形、写字、椭圆、扇形
  • Android自定义控件之写字
  • import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.util.AttributeSet; import ...
    package com.mingshine.farmmachnav.view;
    
    import android.content.Context;
    import android.graphics.Canvas;
    import android.graphics.Color;
    import android.graphics.Paint;
    import android.graphics.Path;
    import android.util.AttributeSet;
    import android.view.MotionEvent;
    import android.view.SurfaceHolder;
    import android.view.SurfaceView;
    
    public class MapSurfaceView extends SurfaceView implements SurfaceHolder.Callback, Runnable {
        private SurfaceHolder mSurfaceHolder;
        //绘图的Canvas
        private Canvas mCanvas;
        //子线程标志位
        private boolean mIsDrawing;
        //画笔
        private Paint mPaint;
        //路径
        private Path mPath;
        private static final String TAG = "pyh";
    
        public MapSurfaceView(Context context) {
            this(context, null);
        }
    
        public MapSurfaceView(Context context, AttributeSet attrs) {
            this(context, attrs, 0);
        }
    
        public MapSurfaceView(Context context, AttributeSet attrs, int defStyleAttr) {
            super(context, attrs, defStyleAttr);
            mPaint = new Paint();
            mPaint.setColor(Color.BLACK);
            mPaint.setStyle(Paint.Style.STROKE);
            mPaint.setStrokeWidth(5);
            mPaint.setAntiAlias(true);
            mPath = new Path();
            mPath.moveTo(0, 100);
            initView();
        }
    
        @Override
        public void surfaceCreated(SurfaceHolder holder) {
            mIsDrawing = true;
            new Thread(this).start();
        }
    
        @Override
        public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
    
        }
    
        @Override
        public void surfaceDestroyed(SurfaceHolder holder) {
            mIsDrawing = false;
        }
    
        @Override
        public void run() {
            while (mIsDrawing) {
                long start = System.currentTimeMillis();
                drawSomething();
                long end = System.currentTimeMillis();
                if (end - start < 100) {
                    try {
                        Thread.sleep(100 - (end - start));
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
    
        }
    
        @Override
        public boolean onTouchEvent(MotionEvent event) {
            int x = (int) event.getX();
            int y = (int) event.getY();
            switch (event.getAction()) {
                case MotionEvent.ACTION_DOWN:
                    mPath.moveTo(x, y);
                    break;
                case MotionEvent.ACTION_MOVE:
                    mPath.lineTo(x, y);
                    break;
                case MotionEvent.ACTION_UP:
                    break;
            }
            return true;
        }
    
        /**
         * 初始化View
         */
        private void initView() {
            mSurfaceHolder = getHolder();
            mSurfaceHolder.addCallback(this);
            setFocusable(true);
            setKeepScreenOn(true);
            setFocusableInTouchMode(true);
        }
    
        private void drawSomething() {
            try {
                //获得canvas对象
                mCanvas = mSurfaceHolder.lockCanvas();
                //绘制背景
                mCanvas.drawColor(Color.WHITE);
                //绘制路径
                mCanvas.drawPath(mPath, mPaint);
            } catch (Exception e) {
    
            } finally {
                if (mCanvas != null) {
                    //释放canvas对象并提交画布
                    mSurfaceHolder.unlockCanvasAndPost(mCanvas);
                }
            }
        }
    }
    
    展开全文
  • 最近需要开发个人签名功能,查阅一些资料,其实就是实现写字板功能就可以了,就是简单的根据手指写下的轨迹去画出内容,具体实现如下: 1.自定义写字板: import android.content.Context; import android.graphics....

    最近需要开发个人签名功能,查阅一些资料,其实就是实现写字板功能就可以了,就是简单的根据手指写下的轨迹去画出内容,具体实现如下:
    1.自定义写字板:

    import android.content.Context;
    import android.graphics.Bitmap;
    import android.graphics.Canvas;
    import android.graphics.Color;
    import android.graphics.Matrix;
    import android.graphics.Paint;
    import android.graphics.Path;
    import android.graphics.PorterDuff;
    import android.util.AttributeSet;
    import android.view.MotionEvent;
    import android.view.View;
    
    public class WritingBoardView extends View {
        // 定义记录前一个拖动事件发生点的坐标
        float preX;
        float preY;
        private Path mPath;
        public Paint mPaint = null;
        // 定义一个内存中的图片,该图片将作为缓冲区
        Bitmap mCacheBitmap = null;
        // 定义cacheBitmap上的Canvas对象
        Canvas mCacheCanvas = null;
    
        public WritingBoardView(Context context) {
            this(context,null);
        }
    
        public WritingBoardView(Context context, AttributeSet attrs) {
            super(context, attrs);
            // 创建一个与该View相同大小的缓存区
            mCacheBitmap = Bitmap.createBitmap(1920, 1080, Bitmap.Config.ARGB_8888);
            mCacheCanvas = new Canvas();
            mPath = new Path();
            // 设置cacheCanvas将会绘制到内存中的cacheBitmap上
            mCacheCanvas.setBitmap(mCacheBitmap);
            // 设置画笔的颜色
            mPaint = new Paint(Paint.DITHER_FLAG);
            mPaint.setColor(Color.RED);
            // 设置画笔风格
            mPaint.setStyle(Paint.Style.STROKE);
            mPaint.setStrokeWidth(3);
            // 反锯齿
            mPaint.setAntiAlias(true);
            mPaint.setDither(true);
        }
    
        @Override
        public boolean onTouchEvent(MotionEvent event)
        {
            // 获取拖动事件的发生位置
            float x = event.getX();
            float y = event.getY();
            switch (event.getAction())
            {
                case MotionEvent.ACTION_DOWN:
                    // 从前一个点绘制到当前点之后,把当前点定义成下次绘制的前一个点
                    mPath.moveTo(x, y);
                    preX = x;
                    preY = y;
                    break;
                case MotionEvent.ACTION_MOVE:
                    // 从前一个点绘制到当前点之后,把当前点定义成下次绘制的前一个点
                    mPath.quadTo(preX, preY, x, y);
                    preX = x;
                    preY = y;
                    break;
                case MotionEvent.ACTION_UP:
                    mCacheCanvas.drawPath(mPath, mPaint); // ①
                    mPath.reset();
                    break;
            }
            invalidate();
            // 返回true表明处理方法已经处理该事件
            return true;
        }
        @Override
        public void onDraw(Canvas canvas)
        {
            Paint bmpPaint = new Paint();
            // 将cacheBitmap绘制到该View组件上
            canvas.drawBitmap(mCacheBitmap, 0, 0, bmpPaint); // ②
            // 沿着path绘制
            canvas.drawPath(mPath, mPaint);
        }
    
        //获取我们绘制成功后的图片
        public Bitmap getPaintBitmap() {
            return resizeImage(mCacheBitmap, 1920, 1080);
        }
    
        // 缩放
        public static Bitmap resizeImage(Bitmap bitmap, int width, int height) {
            //获取图片的宽高
            int originWidth = bitmap.getWidth();
            int originHeight = bitmap.getHeight();
    
            //这里缩放我们的尺寸,缩放多少自己去定义
            float scaleWidth = ((float) width) / originWidth;
            float scaleHeight = ((float) height) / originHeight;
    
            //进行缩放
            Matrix matrix = new Matrix();
            matrix.postScale(scaleWidth, scaleHeight);
            Bitmap resizedBitmap = Bitmap.createBitmap(bitmap, 0, 0, originWidth,
                    originHeight, matrix, true);
            return resizedBitmap;
        }
    
        //清除画板
        public void clear() {
            if (mCacheBitmap != null) {
                mPath.reset();
                mCacheCanvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR);
                invalidate();
            }
        }
    }
    
    1. activity_main.xml
    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".MainActivity"
        android:background="@drawable/bg_0">
       <com.xinrui.guestservice.view.WritingBoardView
           android:layout_width="match_parent"
           android:layout_height="match_parent" />
    </RelativeLayout>
    

    3.Activity引用:

    import android.app.Activity;
    import android.os.Bundle;
    
    import com.xinrui.guestservice.view.WritingBoardView;
    
    public class MainActivity extends Activity {
        private WritingBoardView mDrawView;
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            initView();
        }
    
        private void initView(){
    
        }
    }
    
    展开全文
  • Android bitmap上面写字

    千次阅读 2017-11-08 14:06:01
    context.getResources().getColor(android.R.color. background_dark ));   //图片上添加水印的位置,这里设置的是中下部3/4处   canvas.drawText(water, ( float )(w* 0.01 ), ( float ) (h *  0.9 ), ...
    方法1;

    Bitmap bitmap;
       public Bitmap drawTextToBitmap(Context mContext, Bitmap bit, String mText, String str3) {

          try {
             Resources resources = mContext.getResources();
             float scale = resources.getDisplayMetrics().density;
             // Bitmap bitmap = BitmapFactory.decodeResource(resources, resourceId);
             
    bitmap = bit;
             Bitmap.Config bitmapConfig = bitmap.getConfig();
             if (bitmapConfig == null) {
                bitmapConfig = Bitmap.Config.ARGB_8888;
             }
             bitmap bitmap.copy(bitmapConfig, true);
             Canvas canvas = new Canvas(bitmap);
             Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);//消除锯齿
             
    paint.setDither(true); //获取跟清晰的图像采样
             
    paint.setFilterBitmap(true);//过滤一些
             
    paint.setColor(Color.RED);
             paint.setTextSize((int) (2*scale));
             paint.setShadowLayer(1f0f1f, Color.DKGRAY);//阴影制作半径,x偏移量,y偏移量,阴影颜色
             
    Rect bounds = new Rect();
             paint.getTextBounds(mText, 0, mText.length(), bounds);
             int y = (bitmap.getHeight() + bounds.height()) / 4;
             int x = 0;
             Toast.makeText(MyCaremaActivity.this,"x" +bitmap.getHeight() +"y"+y + "y*sace" + y * scale+"sace"+scale,Toast.LENGTH_LONG).show();
             Log.v("===位置""x" +bitmap.getHeight() +"y"+y + "y*sace" + y * scale+"sace"+scale);
             canvas.drawText(mText, x * scale, y * scale, paint);
             canvas.drawText(str3, x * scale, y * scale + 25, paint);
    //       canvas.drawText(mText, x * scale, 210, paint);
    //       canvas.drawText(str3, x * scale,210 + 25 , paint);
             
    Log.v("===合成图片""====ok" + mText);
             return bitmap;
          } catch (Exception e) {
             // TODO: handle exception
             return null
    ;
          }

      

    方法二:

    Bitmap bitmap;
       public Bitmap addWaterMark(Bitmap src, String water,String  dtr, Context context){
           bitmap  = src.copy(Bitmap.Config.ARGB_8888true);
          int w = bitmap.getWidth();
          int h = bitmap.getHeight();
          Log.v("bitmap","bw"+w+"bh"+h);
          Canvas canvas = new Canvas(bitmap);
          //启用抗锯齿和使用设备的文本字距
          
    Paint textPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.DEV_KERN_TEXT_FLAG);
          //字体的相关设置
          
    textPaint.setTextSize(14.0f);//字体大小
          //textPaint.setTypeface(Typeface.DEFAULT);
          
    textPaint.setColor(Color.RED);
          textPaint.setFakeBoldText(false);
          //自定义宋体
          
    String familyName = "宋体";
          Typeface font = Typeface.create(familyName, Typeface.NORMAL);
          textPaint.setTypeface(font);
          textPaint.setShadowLayer(3f00, context.getResources().getColor(android.R.color.background_dark));
          //图片上添加水印的位置,这里设置的是中下部3/4处
          
    canvas.drawText(water, (float)(w*0.01), (float) (h * 0.9), textPaint);
          canvas.drawText(dtr, (float)(w*0.01), (float) (h * 0.9 20), textPaint);
          canvas.save(Canvas.ALL_SAVE_FLAG);
          canvas.restore();
          return bitmap;
       }

          private  String mYear;
          private  String mMonth;
          private  String mDay;
          private  String mWay;
             String s;
          public   String StringData(){
             final Calendar c = Calendar.getInstance();
             c.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));
             mYear = String.valueOf(c.get(Calendar.YEAR)); // 获取当前年份
             
    mMonth = String.valueOf(c.get(Calendar.MONTH) + 1);// 获取当前月份
             
    mDay = String.valueOf(c.get(Calendar.DAY_OF_MONTH));// 获取当前月份的日期号码
             
    mWay = String.valueOf(c.get(Calendar.DAY_OF_WEEK));
             SimpleDateFormat formatter = new SimpleDateFormat ("HH:mm:ss ");
             Date curDate = new Date(System.currentTimeMillis());//获取当前时间
             
    String str = formatter.format(curDate);
             if("1".equals(mWay)){
                mWay ="天";
             }else if("2".equals(mWay)){
                mWay ="一";
             }else if("3".equals(mWay)){
                mWay ="二";
             }else if("4".equals(mWay)){
                mWay ="三";
             }else if("5".equals(mWay)){
                mWay ="四";
             }else if("6".equals(mWay)){
                mWay ="五";
             }else if("7".equals(mWay)){
                mWay ="六";
             }
             s"时间:"+mYear "年" mMonth "月" mDay+"日"+"周"+mWay+str;
             Log.v("==获取时间",mYear "年" mMonth "月" mDay+"日"+"/星期"+mWay+str);
             Log.v("==获取时间s",s);
             return s;
          }

    }

    展开全文
  • 主要介绍了Android自定义控件实现简单写字板功能的相关资料,需要的朋友可以参考下
  • 本文给大家分享一个使用Android开发写字板功能Dem、简单操作内存中的图像、对图像进行简单的处理、绘制直线、以达到写字板的效果 效果图如下 XML布局代码 <RelativeLayout xmlns:android=...
  • Android实现的写字板(绘画板)

    千次阅读 2017-09-14 17:54:58
    Android实现的写字板(绘画板)前言: 通过Android实现绘画板的功能,能够在应用中进行绘画(写字)操作,完成绘画(写字)后,可以将我们自己绘制的图画(字体)进行保存,同时也能清空画板上的内容,重新开始新的...
  • 先来看看效果图就是简单的根据手指写下的轨迹去画出内容一、实现之前一篇文章里提到了android官方给出的自定义控件需要考虑以下几点:创建View处理View的布局绘制View与用户进行交互优化已定义的View就按照这个步骤...
  • android利用Paint在Canvas上实现竖排写字
  • 在最近的开发项目中,要实现自定义写字板实现签名和用图片做橡皮擦实现擦除功能,这就需要动态添加图片,然后拖动图片的同时,实现擦除的效果,具体步骤如下: 1.自定义写字板: import android.content.Context; ...
  • Android Opengl es 写字 笔记

    千次阅读 2014-03-07 11:29:34
     android.graphics.Bitmap.Config;  import  android.graphics.Paint;    public   class  GLFont {      //要打印的字 字体大小 字的信息 最大宽度     public   static  ...
  • //第一步 导入依赖   implementation('... //第二步 xml布局 ... android:id="@+id/mButton" android:text="按钮" android:layout_width="100dp" ...
  • Android自定义控件2-简单的写字板控件

    千次阅读 多人点赞 2016-04-13 23:46:57
    今天就来学习自定义一个简单的写字板控件。先来看看效果图就是简单的根据手指写下的轨迹去画出内容实现在上一篇文章里提到了android官方给出的自定义控件需要考虑以下几点: 创建View 处理View的布局 绘制View 与...
  • 34m检测到 $bili 中没有缓存033[0m" fi done #定义bilibili缓存目录 #bili_dir="/storage/emulated/0/Android/data/tv.danmaku.bili/download/" #获取bilibili缓存目录 #cache_dir=$(ls $bili_dir) #输出bilibili...
  • 有人说SurfaceView是View的孪生兄弟...本文我们不介绍SurfaceView的基础用法,只介绍如何使用SurfaceView来制作一个简易写字板。PreView(gif加载较慢,请耐心等待)思路 创建一个类继承我们的SurfaceView 通过onTouchEv
  • Android绘图基础--简易写字

    千次阅读 2015-12-03 10:09:28
    * 自定义一个写字板 * @description:自定义一个控件,实现一个可以手写的效果,后期是要实现刮刮卡抽奖效果,待续…. */ @SuppressLint(“DrawAllocation”) public class WriteView extends View { ...

空空如也

空空如也

1 2 3 4 5 ... 10
收藏数 191
精华内容 76
关键字:

android写字