Code example for TextPaint

Methods: getTextSize

0
            canvas.drawText(drawChar, 0, 1, drawX, drawY, paint);
        } 
         
        //キャレットの位置ならキャレットを描画する 
        if(point.getColumn() == caret.getColumn() &&point.getRow() == caret.getRow()){
            caret.draw(canvas, drawX, drawY, (int)paint.getTextSize(), paint);
        } 
         
        point.next(drawChar, paint);
    } 
     
    //この文字の位置が描画範囲内かどうか返す 
    public boolean isDrawCharacter(int drawX, int drawY){
        int right = getWidth();
        int bottom = getHeight();
         
        if(0 <= drawY && drawY <= bottom){
             if(0 <= drawX && drawX <= right){
                 //描画範囲内 
                 return true; 
             }