stroke

iphone stroke path used for clipping UIImage

雨燕双飞 提交于 2019-12-24 21:02:31
问题 I'm very new to CoreGraphics (although I've been doing iphone programming for a while) Question, I have this snippet that scales proportionally and clips an UIImage to a circle: -(UIImage *)counterpartImageForSchedule:(Schedule *)counterpartSchedule inSize:(CGSize)size { // This function returns a newImage, based on image, that has been: // - scaled to fit in (CGRect) rect // - and cropped within a circle of radius: rectWidth/2 UIImage *image=[UIImage imageNamed:@"fakeuser1.png"]; // when

Java JMapViewer: How can I change the color of a MapPolygon?

我们两清 提交于 2019-12-24 17:01:03
问题 I'm creating an application for drawing pollution information on a JMapViewer. I want to do this with MapPolygons, but I didn't find a good documentation about it. I succeeded to create new MapPolygons like this: private MapPolygon getPolygon(double lat, double lon, Color col){ List<Coordinate> coords = new ArrayList<>(); //add all points to the list... MapPolygon poly = new MapPolygonImpl(coords); return poly; } I'm wondering how I could change the color and remove the border of the

Java JMapViewer: How can I change the color of a MapPolygon?

佐手、 提交于 2019-12-24 16:59:57
问题 I'm creating an application for drawing pollution information on a JMapViewer. I want to do this with MapPolygons, but I didn't find a good documentation about it. I succeeded to create new MapPolygons like this: private MapPolygon getPolygon(double lat, double lon, Color col){ List<Coordinate> coords = new ArrayList<>(); //add all points to the list... MapPolygon poly = new MapPolygonImpl(coords); return poly; } I'm wondering how I could change the color and remove the border of the

kCGTextStroke's Fill and Stroke aren't positioned correctly

被刻印的时光 ゝ 提交于 2019-12-22 11:37:34
问题 So I'm using the code below to apply a stroke (and fill) to text in a UILabel , and it's coming out like the image below. The stroke is heavier on one side than the other (look at the top of the letters compared to the bottom, and the right compared to the left. The period at the end makes it very noticeable, too, looks like a googly eye). I've not got any shadowing turned on at all, so I don't think it's the shadow interfering with the stroke. What could be causing this? - (void)

Using CSS, how do you create a text stroke outline that is *thicker* than 1px?

假装没事ソ 提交于 2019-12-22 08:40:09
问题 Below is the code I was using to do a Text Stroke outline of 1px. But how do I get the outline thicker? If I just replace all "1px" with "5px", the result looks crazy. HTML <div class="element"> Hello! </div> CSS .element { color:white; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; } 回答1: You might use SVG as well, though it requires more code: .element { font-size: 50px; } svg { width: 100%; height: 1.3em; } svg text { fill: pink; stroke-width: 8px; paint

AffineTransform without transforming Stroke?

感情迁移 提交于 2019-12-22 03:20:08
问题 When using the Graphics2D scale() function with two different parameters (scaling by different ratios in x- and y-direction), everything drawn later on this Graphics2D object is scaled too. This has the strange effect that lines drawn in one direction are thicker than those in another direction. The following program produces this effect, it shows this window: public class StrokeExample extends JPanel { public void paintComponent(Graphics context) { super.paintComponent(context); Graphics2D g

Partial border/stroke using SVG

左心房为你撑大大i 提交于 2019-12-22 00:34:52
问题 I'm using svg/d3 for creating a chart made of 'rect' elements. What is the best way for adding a partical border/stroke for each rectangle (only on top of the rectangle)? Thanks 回答1: I don't think SVG supports stroking only portions of a rectangle or path - stroke isn't like a CSS border. You're left with a few other options, all of which take some extra work: Stroke the entire rect and apply a clipPath to remove the other three edges - probably works best if you make the rectangles bigger

Android multi stroke gesture not working

旧时模样 提交于 2019-12-22 00:02:46
问题 I modified an existing app,GestureBuilder,to accept multiple strokes.Hence to accept the letter A,D, F and so on. I created a simple app which recognises if the letter is correct or not.My problem is: 1.I have successfully recorded multi stroke letter in a file called gesture with gestureBuilder. 2.My application does not accept multi stroke gesture.But i have set fadeoffset to 1000 and gesturestroketype as multiple.I do not know why this is happening.The moment I enter next xtroke to write

Why is SVG stroke-width : 1 making lines transparent?

故事扮演 提交于 2019-12-20 08:36:02
问题 I'm creating stock charts with svg and I'm having a problem when I set the stroke-width of my path elements to 1. Instead of making the lines more narrow, it just makes it the same size as stroke-width:2 but slightly transparent. I can't post an image of it though because I don't have enough reputation points... My svg tag looks like so: <div style="height:300px; width:400px; overflow:hidden"> <svg style="position:relative" height="10000" width="10000" version="1.1" xmlns="http://www.w3.org

I need to change the stroke color to a user defined color. Nothing to do with the state

落爺英雄遲暮 提交于 2019-12-17 15:15:30
问题 I need to change the stroke color from the app. The user is able to change the background color so I need to also let them change the stroke (outline) of the button. As its is already set in the drawable (sample below) I have not found a way to change this. Seems like all of the other questions like this just said to use the XML file.... but that doesnt let me make it dynamic. Thank you for any help! I need to change the stroke color to a user defined color. Nothing to do with the state. <