Vote count: 0I'm working on a project , where i need to create user friendly rectangles on top of the image , i'm able to draw rectangles now on top of the image , but i'm not getting about how to calculate required rectangles for a imag...
ادامه مطلبVote count: 0I want to make a program where diffent drawings are shown. The user have to press a button to choose one af the drawings. A specific text variable is then saved. Then the user do the same procedure with the next drawings and in the end all the text will be put together and...
ادامه مطلبVote count: 0I'll try to keep it short, these is the situation:Creature Class : x y coordinates, moves around randomly and shoots ProjectilesProjectile Class : x y coordinates, moves in a straight line and dies when impacting CreaturesArena Class : JPanel which iterates over the lists o...
ادامه مطلبVote count: 0 I am just wondering how to draw the dynamic updating path in tensorflow playground. You could click play the button and then you'll see the path (at the right side under OUTPUT). What kind of javascript script it is? asked 1 min agoFrank Fan Let's block ads!...
ادامه مطلبVote count: 0 I am trying to draw a custom popup menu on MFC single-document interface (SDI) project.From here, I found The framework calls this member function for the owner of an owner-draw button control, combo-box control, list-box control, or menu when a visual aspect of the control or menu has changed.So I added the handle OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct) and added some code inside this function, but I found that this callback didn't be called by the framework when I right click on the view, like this:How to make a popup menu dynamically? asked 1 min agosflee Let's block ads!...
ادامه مطلبVote count: 0 I'm trying to draw this chart-like shape on an html canvas: 0 100 . . 200 . . . 300 . . . 400 . . . . 500 ................................. I can't see anything wrong with my shape's co-ordinates: (0, 500), (0, 400), (100, 400), (200, 300), (300, 200), (400, 100), (400, 500) Html/js: function drawSteps(heights) { var y = 500; var steps = document.getElementById('steps').getContext('2d'); steps.fillStyle = '#C3EDBD'; steps.beginPath(); steps.moveTo(0, y); var x = 0; for (var i = 0; i < heights.length; i++) { console.log(x.toString() + ', ' + (y - heights[i]).toString()); steps.lineTo(x, y - heights[i]); x += 100; } steps.lineTo(x, 500); steps.lineTo(0, 500); steps.closePath(); s...
ادامه مطلبVote count: 0 I am writing an application that needs to draw outside of it's main window area. I already have to code to actually do the drawing: [DllImport("User32.dll")] public static exte IntPtr GetDC(IntPtr hwnd); [DllImport("User32.dll")] public static exte void ReleaseDC(IntPtr hwnd, IntPtr dc); IntPtr desktopPtr = GetDC(IntPtr.Zero); Graphics g = Graphics.FromHdc(desktopPtr); g.DrawLine(Pens.White, 0, 0, Screen.FromControl(this).WorkingArea.Width, Screen.FromControl(this).WorkingArea.Height); g.Dispose(); ReleaseDC(IntPtr.Zero, desktopPtr); However the on paint event is an unsuitable place to put the code because it's not called when something outside of the form is redrawn. So my que...
ادامه مطلبVote count: 0 Basically, I have a component Called DrawerLayout, and DrawerContent which contains the contents of the Drawer. Here is what the render() in DrawerLayout retus: } > In the documentation, it says that DrawerLayoutAndroid has closeDrawer() and openDrawer() methods. How can I pass these to DrawerContent? Thanks asked 3 mins agouser1354934 Let's block ads!...
ادامه مطلبVote count: 0 Can someone tell me how i would make this draw a circle? @Override public void paint(Graphics g) { super.paint(g); for(int i = 0; i < 10; i ++) { g.drawRect((int) Math.pow(i, 2), 10 * i, 32, 32); } } asked 1 min agoJackson F. Let's block ads!...
ادامه مطلبVote count: 0 I have trouble in drawing the line with arrow using d3.js. I did see some tutorials and wrote this code, but I just see the line with no arrow mark. Could anyone please look at it and tell me where am I missing. Thanks in advance. Drawing line with arrow at the end var w = 300; var h = 300; var svg = d3.select("body") .append("svg") .attr("width", w) .attr("height", h); //arrow svg.append("svg:defs").append("svg:marker") .attr("id", "triangle") .attr("viewBox", "0 -5 10 10") .attr("refX", 15) .attr("refY", -1.5) .attr("markerWidth", 6) .attr("markerHeight", 6) .attr("orient", "auto"); //line svg.append("line") .attr("x1", 100) .attr("y1", 100) .attr("x2", 200) .attr("y2", 100) ...
ادامه مطلبVote count: 0 I am working on android app and I want to make polygon on android app.so far i have used latitude and longitude to make polygon but how can i get array of coordinate to draw exactly like this.All I need seems like this screenshot. i need coordinates to make a polygon like this but how can i get all coordinates in below map. asked 2 mins agoJony Let's block ads!...
ادامه مطلبVote count: 0 On the following page, http://find-a-mooring.com/berth/a3/ generated by a Wordpress plugin, I want to change the view to Satellite view after the page has loaded. I have tried this: function setMapSatellite() { map.setMapTypeId(google.maps.MapTypeId.SATELLITE); } Where am I going wrong? Aoyingly the plugin writer (wp-types) have a request to add the feature (change map type) , but have not implemented it. asked 51 secs agoM1 Creative Developer Let's block ads!...
ادامه مطلبVote count: 0 So I want to draw a 2D image using OpenGL ES of some shape by drawing one big triangle and then draw additional triangles that go over this triangle such that they cutout the big triangle and result in the desired shape. I'm not sure where to define these additional objects: Do I define them within the class of the original object or do I create new classes for each object? Thank you asked 39 secs agoThe Coder Let's block ads!...
ادامه مطلبVote count: 0 i'm trying to create a binary tree using a given input in the first line is the number of nodes=4,root=0,depth=2 and the next line are the edges How can i implement a function which reads from the standard input and draws the graph according to the input Input 4 0 2 0 1 0 3 2 3 My Code class BinaryTree(object): def __init__(self, root): self.left = None self.right = None self.root = root def left_child(self): retu self.left def right_child(self): retu self.right def node_value(self, value): self.root = value def get_node(self): retu self.root def in_order(self, tree): if tree is not None: in_order(tree.left_child()) print(tree.get_node()) in_order(tree.right_child()) asked 1 mi...
ادامه مطلبVote count: 0 I am developing an app for Android and I am trying to find a fast and reliable graph library. After some searching, I found 4 libraries: AChartEngine, WilliamChart,HelloCharts and AndroidPlot.They don't have any graph chart like network if any one know library please tell my. Thanks. asked 3 mins agoZaher88abd Let's block ads!...
ادامه مطلبVote count: 0 I have an n*2 matrix (n is even), and regard each row as a point in the R^2 Euclidean Space. I can use the plot command in R to plot each row vector. Then I generate another n/2*2 matrix, in which each row contains two integers between 1 and n, which index the rows for the two points in the matrix I just plotted. However, if I want to draw a line between row vector in the n*2 matrix according to the rows in the newly established n/2*2 matrix, what command in R should I use? (For example, if the 1st row for the n/2*2 matrix is (1,3), I should draw a line coecting the 1st and 3rd row(point) in the n*2 matrix.) Thanks! asked 1 min agoask This entry passed through the Full-Text RSS...
ادامه مطلب