Questions tagged «paint»


3
此人如何用Microsoft Paint编码“ Hello World”?
我刚刚在过去几天中看到了这一点,无法弄清楚它是如何工作的。我谈论的视频在这里: 这是这个堆栈溢出问题的最高评价的答案:为什么该程序被三个编译器拒绝? 该位图如何显示“ Hello World”的C ++程序?
99 c++  c  paint 


2
如何在位图上绘制粗体文本?
我想要一个带有粗体文本的位图图标以将其绘制在地图上。我有一个片段可以在图片上写文字: Bitmap icon = BitmapFactory.decodeResource(PropertyMapList.this.getResources(), R.drawable.location_mark); TextPaint paint = new TextPaint(); paint.setColor(Color.BLACK); paint.setTextSize(14); paint.setFakeBoldText(true); //paint.setTextAlign(Align.CENTER); Bitmap copy = icon.copy(Bitmap.Config.ARGB_8888, true); Canvas canvas = new Canvas(copy); //canvas.drawText(jsonObj.getString("district_name"), 5, canvas.getHeight()/2, paint); String districtName = jsonObj.getString("district_name"); StaticLayout layout = new StaticLayout((districtName.length()>25 ? districtName.substring(0, 24)+"..":districtName)+"\n"+jsonObj.getString("total_properties"), paint, canvas.getWidth()-10,Layout.Alignment.ALIGN_CENTER, 1.3f, 0, false); canvas.translate(5, canvas.getHeight()/2); //position the …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.