android-canvas

Drawing shapes in Android MapView independent of the zoom level

限于喜欢 提交于 2021-02-05 17:44:37
问题 I need to draw shapes just like those you would create with custom maps on Google Maps, using Android's MapView. In other words, if I draw a shape on the map, when I zoom out it should shrink, covering the same area of the map regardless of the zoom level. Example following the Android Reference: @Override public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) { super.draw(canvas, mapView, shadow); //---translate the GeoPoint to screen pixels--- Point screenPts = new

Drawing shapes in Android MapView independent of the zoom level

心已入冬 提交于 2021-02-05 17:41:22
问题 I need to draw shapes just like those you would create with custom maps on Google Maps, using Android's MapView. In other words, if I draw a shape on the map, when I zoom out it should shrink, covering the same area of the map regardless of the zoom level. Example following the Android Reference: @Override public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) { super.draw(canvas, mapView, shadow); //---translate the GeoPoint to screen pixels--- Point screenPts = new

Drawing shapes in Android MapView independent of the zoom level

十年热恋 提交于 2021-02-05 17:36:14
问题 I need to draw shapes just like those you would create with custom maps on Google Maps, using Android's MapView. In other words, if I draw a shape on the map, when I zoom out it should shrink, covering the same area of the map regardless of the zoom level. Example following the Android Reference: @Override public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) { super.draw(canvas, mapView, shadow); //---translate the GeoPoint to screen pixels--- Point screenPts = new

Drawing shapes in Android MapView independent of the zoom level

浪尽此生 提交于 2021-02-05 17:34:09
问题 I need to draw shapes just like those you would create with custom maps on Google Maps, using Android's MapView. In other words, if I draw a shape on the map, when I zoom out it should shrink, covering the same area of the map regardless of the zoom level. Example following the Android Reference: @Override public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) { super.draw(canvas, mapView, shadow); //---translate the GeoPoint to screen pixels--- Point screenPts = new

Creating canvas on top of SurfaceView android

前提是你 提交于 2021-01-29 20:08:49
问题 I am trying to create canvas like the below image on the top SurfaceView using which i will open the camera This rectangular canvas should support every screen size in android and should be at center_vertical and center_horizontal of the screen with rest of the screen as translucent black as displayed in the image. I am very new with Canvas and have tried this: Java: package com.example.cameraapplication; import android.content.Context; import android.graphics.Canvas; import android.graphics

Cropping a full screen camera image bitmap into a Surface view height and width

做~自己de王妃 提交于 2021-01-28 05:15:08
问题 I am trying to click only a rectangular portion of the screen from camera using this code: Java code: package com.example.cameraapplication; import androidx.appcompat.app.AppCompatActivity; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.hardware.Camera; import android.os.Bundle; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.View; import android.widget

Draw bitmap in specified XY positions in the Canvas

僤鯓⒐⒋嵵緔 提交于 2020-12-13 06:39:41
问题 I am trying to overlay a image in a specific position in the video so that i can combine both.But could not place the image to exact position selected.its moving somewhere else the final output. I am using this library to combine image and video https://github.com/MasayukiSuda/Mp4Composer-android (out of box Any other library suggestions)In this library i can set the image in 4 different positions: public enum Position { LEFT_TOP, LEFT_BOTTOM, RIGHT_TOP, RIGHT_BOTTOM } mp4Composer = new

Draw bitmap in specified XY positions in the Canvas

不想你离开。 提交于 2020-12-13 06:33:39
问题 I am trying to overlay a image in a specific position in the video so that i can combine both.But could not place the image to exact position selected.its moving somewhere else the final output. I am using this library to combine image and video https://github.com/MasayukiSuda/Mp4Composer-android (out of box Any other library suggestions)In this library i can set the image in 4 different positions: public enum Position { LEFT_TOP, LEFT_BOTTOM, RIGHT_TOP, RIGHT_BOTTOM } mp4Composer = new