Possible to give fixed angle in path? - wpf

I have a path as shown in the attached image. i would like to know if it is possible to give a fixed angle for the edge of the path, coz i would like to use the same angle while styling other controls as well. Is there a way to make this possible (in Expression Blend)?

You can do this using 'Subtract' Path Operation.
1) First draw the required shapes like
2) Draw a small rectangle and rotate it to a certain angle you want. Say 50. Then, place the small rotated rectangle over the shapes draw previously, like
3) Bring each of the Big Shapes to the front, like
4) Finally, goto "Object -> Combine -> Subtract" by selecting each big and small rectangle pair. The final output will have same angle, like

Related

PostGIS clipping raster with the same color band as the orignal raster

I am trying to clip a raster so that the clipped raster would have the same minimum and maximum values for the color band as the original raster.
For example if i clip the raster with this command:
create table clipped AS SELECT
ST_Clip(rast,ST_MakePolygon(ST_GeomFromText ('LINESTRING(424920
7370964,
424920 7371476,425432 7371476,425432 7370964,424920 7370964) ')) ) FROM original;
I get the following result:
So the clipped raster has band minium value as 0 and maxium value as 20. Instead of that, i want it to be exactly same as the 'original' raster: from 0 to 33.
I am new for PostGIS, but i have tried to find an answer for a while to this question but i haven't found anything. I have tried the functions like ST_Reclass but with no success. What is the proper way to do this with PostGIS?
Why is that happening?
The reason that your range changes is because your maximum value (33 in your case) is not contained within the area you clipped. This is not a bad thing, its just a fact. It's not a PostGIS thing, its just a clipping thing.
Can we find a solution?
I'm guessing that the real problem you want solved is that the two rasters look very different in QGIS. That's really easy to fix! I'll show you how with some example data.
Exmaple Data
Here's what we're starting with:
Link to image because I don't have enough rep to embed an image yet, I guess...
Double click on the "clipped" layer to open up the "Layer Properties" window and select the Style tab from the list on the left side of the window
Locate the text window for "Max" and change it to 33 to match your original raster. This picture may help. It's worth noting that you may run into a case where your Minimum is different in the clipped raster as well like it is here. You can adjust that in the same fashion.
Apply your changes and watch them work!

Drawing largers points with X11

I know X11 has XDrawPoints for drawing multiple points in a batch, but I'd like to have slightly larger points sometimes (useful if you're eg: drawing a line through them), but can't find any way to draw larger points without doing something kludgy like drawing a tiny filled rectangle, or zero-length line with endcaps.
Is there a reasonable way to set the point size that I'm missing?
A point is a single pixel in Xlib. But XFillArcs() would let you create a list of XArc structures that describe small circles. Then you can scale these circles to any radius by setting XArc.width and XArc.height.

Clipping Paths in Silverlight Mobile (WP7) - I can't create anything but a simple rectangle?

I'm trying to create clipping paths for shapes, such as circles, polygons, etc. I'm actually trying to make the clipping path follow the line of the shape. I've tried the below in Expression Blend, what am I missing? What I'm really trying to do here is have the user trace shapes with an InkPresenter, and have it error if they've drawn outside the lines X times... if Clipping Paths is the wrong way to go here, by all means please let me know what the correct direction is :)
I created a rectangle, rounded the edges until it was a circle and then Make Clipping Path was enabled. I select it and I get the error: "Rounded corners are not supported for clipping paths in Silverlight 4 Mobile and have been removed."
Then I created about 50 rectangles over the circle, then Make Compound Path... and now Make Clipping Path is disabled again
Then I left the 50 rectangles as just Rectangles and thought I'll just create each of them as a Clipping path... I do the first one, so far so good... I select the second and make it a Clipping Path for my InkPresenter, and it deletes my first Clipping Path and uses the second. Dead in the water, it looks like each object can only have one clipping path.
How do I get around this?
Tim
You can use a PathGeometry to create an arbitrary shape geometry that you can assign as Clip to your InkPresenter.
You can build up the points for the PathGeometry from input events as the user traces the shape.

KML + Google Earth: Fill a quadrilateral with a bitmap?

I'm building a KML file to use as a map layer in Google Earth and whatever else handles KML/KMZ files.
What I want to do is this: Display a number of bitmap images such that each is stretched to fit into a specified quadrilateral, where the first vertex of the quadrilateral specified would, for example, be the top-left corner of the bitmap, the next vertex would be where the top-right corner fits, and so on. Is there a (relatively) simple way to do this? If distorting/stretching the image isn't possible in any simple way, just displaying it at a specified location, scaling and rotation would be acceptable.
Update: To clarify: Given a set of four geospatial coordinates that form a quadrilateral, I'd like to take a rectangular bitmap (either via a specified URL or included in a KMZ file) and lay it onto the map such that its four corners line up with the four corners of the aforementioned quadrilateral. If it's not possible to distort an image to fit any quadrilateral, it would be sufficient to just specify position, rotation and size. Hopefully that's a little clearer.
Any help would be much appreciated.
Thanks!
Figured it out; you use a LatLonQuad:
<GroundOverlay>
<name>Example Image Overlay</name>
<color>87ffffff</color>
<Icon>
<href>mypicture.jpg</href>
<viewBoundScale>0.75</viewBoundScale>
</Icon>
<gx:LatLonQuad>
<coordinates>
-115.8993079806076,36.72147153334678,0
-115.8990441694222,36.72500067085463,0
-115.9002128356738,36.72511090523616,0
-115.9005214644026,36.72164386079184,0
</coordinates>
</gx:LatLonQuad>
</GroundOverlay>

Silverlight Image Positioning/Transformation

What I would like to do is the following:
Change the points of the four corners of an image.
What is possible now, is to change the top left corner. But that will only move the image.
I want to transform the image by changing the corner coordinates.
The effect will be a 3d-kind transformation.
A skew transformation will not do, I want to be able to position the corners freely.
Is this possible?
I don't think you can just place corners of an image arbitarily and have it distort accordingly. It might be better if you specified the effect you are trying to acheive.
There are couple of options which may or may not suit.
Would a Matrix3DProjection serve your purpose (as well as do a lot a math for you)?
Would using the image to Fill a path or using a path to clip the image get the effect you want.

Resources