circle

Draw segments from a circle or donut

匿名 (未验证) 提交于 2019-12-03 09:05:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've been trying to figure out a way to draw segments as illustrated in the following image: I'd like to: draw the segment include gradients include shadows animate the drawing from 0 to n angle I've been attempting to do this with CGContextAddArc and similar calls but not getting very far. Can anyone help ? 回答1: There are many parts to your question. Getting the path Creating the path for such a segment shouldn't be too hard. There are two arcs and two straight lines. I've previously explained how you can break down a path like that so I

How to make a circle around content using CSS?

匿名 (未验证) 提交于 2019-12-03 09:05:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Like this With only this code 1 回答1: http://jsfiddle.net/MafjT/ You can use this css span { display: block; height: 60px; width: 60px; line-height: 60px; -moz-border-radius: 30px; /* or 50% */ border-radius: 30px; /* or 50% */ background-color: black; color: white; text-align: center; font-size: 2em; } Because you want a circle, you need to set the same value to width, height and line-height (to center the text vertically). You also need to use half of that value to the border radius. This solution always renders a circle, regardless of

Draw circles of constant size on screen in Google Maps API v2

匿名 (未验证) 提交于 2019-12-03 07:36:14
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm working on an Android Application using Gooogle Maps API v2. I have markers on my map, and I'd like to circle one of them. I managed to do that easily, by using the Circle and Circle Options classes. But I'd also like my circle to keep the same size on the screen when zooming or unzooming, just like the markers do. It means that the circle must have a constant radius in terms of pixels. Sadly, we cannot set a radius in pixels in the API v2. I have tried several solutions, but I'm not satisfied. In the first one, I just multiply or divide

Python, Draw a circle with PIL

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am looking for a command that will draw a circle on an existing image with PIL. im = Image.open(path) I want a function that will draw a colored circle with radius r and center (x,y) 回答1: image = Image.open("x.png") draw = ImageDraw.Draw(image) draw.ellipse((x-r, y-r, x+r, y+r), fill=(255,0,0,255)) 回答2: Use ImageDraw.ellipse with square bbox like (0,0,10,10), which mean with diameter 10. 回答3: image = Image.open("x.png") draw = ImageDraw.Draw(image) draw.ellipse((x-r, y-r, x+r, y+r), fill=(255,0,0,0)) using this way i am unable to make it

white circle in microsoft SQL server management studio 2012

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm new in SQL server management studio 2012 now i'm use data from server and it has a white circle on my database 4 people in my team use this server and everyone see that... we use same ID to login to this server... what does it's mean please help me... 回答1: The white circle usually contains a green arrow, a blue paused symbol, or a red square - indicating that the SQL Server service is either running, paused, or stopped respectively. Usually security is set-up so that only administrators can see the service status, so regular users don't

How to define a circle shape in an android xml drawable file?

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have some problems finding the documentation of the definitions of shapes in XML for Android. I would like to define a simple circle filled with a solid color in an XML File to include it into my layout files. Sadly the Documentation on android.com does not cover the XML attributes of the Shape classes. I think I should use an ArcShape to draw a circle but there is no explanation on how to set the size, the color, or the angle needed to make a circle out of an Arc. 回答1: This is a simple circle as a drawable in Android. 回答2: Set this as

Adding elements to a D3 circle pack nodes

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to make a zoomable circle packing chart. I'd like each child circle to contain a smaller chart which would always have the same structure (i.e. 4 columns, only the heights of the bars would change). I have tried adding a simple rect to my chart so far but the rects are not added in the circle and are statics: JS: var margin = 20, diameter = 400; var color = d3.scale.linear() .domain([-1, 5]) .range(["hsl(152,80%,80%)", "hsl(228,30%,40%)"]) .interpolate(d3.interpolateHcl); var pack = d3.layout.pack() .padding(2) .size([diameter -

Build Circle from 3 Points in 3D space implementation in C or C++

匿名 (未验证) 提交于 2019-12-03 02:52:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: We have 3(three) xyz points that define a circle in 3D space, this circle needs to be converted into a polyline(for further rendering). I'm looking for a ready C or C++ function or free library that can do the job. Don't understand why this was closed. And I can't even answer my own question there. Shame on you guys. But you will not stop the knowledge spreading! 回答1: There's a much simpler solution to find the circle parameters in real 3D, just take a look at the "barycentric coordinates" section in http://en.wikipedia.org/wiki

Check if marker is inside circle radius

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to know if a given marker is inside a circle radius. In javascript, i can do something like: google.maps.geometry.spherical.computeDistanceBetween(latLngCircleCenter, latLngPoint); But in android, using maps-v2, i'm stucked. 回答1: After a lot of research, i found a very simple solution: float[] distance = new float[2]; Location.distanceBetween( marker.getPosition().latitude, marker.getPosition().longitude, circle.getCenter().latitude, circle.getCenter().longitude, distance); if( distance[0] > circle.getRadius() ){ Toast.makeText

How to stylize a circle?

匿名 (未验证) 提交于 2019-12-03 02:41:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: It's possible to stylize polylines with dashes or dots by using icon as described in Styling a Google Maps v3 Polyline with Dashes or Dots? . But I didn't find how to stylize circles. Any suggestions, reference please. 回答1: One option, draw a circle with a google.maps.Polyline and stylize the polyline: var donut = new google.maps.Polyline({ path: drawCircle(new google.maps.LatLng(-33.9,151.2), 100, 1), strokeOpacity: 0, icons: [{ icon: lineSymbol, offset: '0', repeat: '20px' }], strokeWeight: 2, fillColor: "#FF0000", fillOpacity: 0.35 });