shape

Shape connectors in Visio

*爱你&永不变心* 提交于 2019-12-04 01:54:52
问题 I'm writing an Add-In to Visio 2010 in Studio 2010 on C#. I need to read a diagram currently opened in Visio. I know how to read shapes of the diagram. The question is if I have a shape object, which properties can give me coordinates of the shape on the page and other shapes (if any), the current one is connected with, if I have a connector object, which properties can give me shapes it connects and direction of the connection. 回答1: Connections in Visio are handled through Connect objects.

Android custom shape

六眼飞鱼酱① 提交于 2019-12-04 01:44:42
问题 I know it is possible to make a shape looking something like this: But I don't know how to start with it. Can I make it as a shape? or do I have to do something else? BR 回答1: Oh look at that, I was wrong - gradients are not a problem: import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.LinearGradient; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.RectF; import android.graphics.Shader;

Creating custom shapes from primitives

大兔子大兔子 提交于 2019-12-03 20:45:26
I'm trying to create a custom Physics shape with combining primitive shapes. The goal is to create a rounded cube. The appropriate method seems to be init(shapes:transforms:) which I found here https://developer.apple.com/library/prerelease/ios/documentation/SceneKit/Reference/SCNPhysicsShape_Class/index.html#//apple_ref/occ/clm/SCNPhysicsShape/shapeWithShapes:transforms : I'm thinking this could be done with 8 spheres, 12 cylinders and a box in the middle. Can anyone provide an example of doing that? Yes, as you may have noticed, creating a physics body from an SCNBox with rounded corners

Custom Shape Button Android

ぃ、小莉子 提交于 2019-12-03 20:33:35
问题 I have to address this type of views which has buttons below example. http://www.planet1107.net/blog/custom-shape-uibutton-tutorial/ It is in the iOS. so is there any way to make it in Android. I also have to give click events on all of those buttons. 回答1: I would recommend just exporting these custom images to pngs. Then adding the pngs to your Android project and simply referencing them in the code or XML. Then on a click event you can simply change the icon to indicate that it has been

Making all photos square via css

懵懂的女人 提交于 2019-12-03 15:41:19
问题 I'm trying to make a series of photos into square photos. They may be rectangular horizontally (i.e. 600x400) or vertically (400x600), but I want to get them to be 175x175 either way. My thought was to max-height or max-width the smaller side, and not allow overflow beyond 175px on the larger side...however, I'm having problems with it. Is this possible with css? Below is my attempt, but it giving rectangles still: <div style="min-height:175px; overflow:hidden; max-height:175px;"> <img style=

Computing the circularity of a binary image

…衆ロ難τιáo~ 提交于 2019-12-03 14:57:16
I am trying to compute the circularity of a given binary image. After some research its clear to me that the formula for circularity is 4π*area/perimeter^2 Which should range from 0 to 1, 1 being most circular. Given the binary matrix im Computing the area is trivial area = sum(im) I am computing the perimeter following this rule: A pixel is part of the perimeter if it is nonzero and it is connected to at least one zero-valued pixel per = matrix(0, nrow(im), ncol(im)) for(i in 2:(nrow(im)-1)){ for(j in 2:(ncol(im)-1)){ if(im[i,j] != 0){ x=c(im[i-1,j],im[i+1,j],im[i,j-1], im[i,j+1]) if(0 %in% x

opencv shape detection

╄→гoц情女王★ 提交于 2019-12-03 14:06:41
问题 hi am using opencv for a simple shape detection detect(triangles,polygons,circles) and here is my code: int main() { IplImage* img = cvLoadImage("C:/Users/tarek/Desktop/test5.png"); //show the original image cvNamedWindow("Raw"); cvShowImage("Raw",img); //converting the original image into grayscale IplImage* imgGrayScale = cvCreateImage(cvGetSize(img), 8, 1); IplImage* imgCanny = cvCreateImage(cvGetSize(img), 8, 1); cvCvtColor(img,imgGrayScale,CV_BGR2GRAY); //thresholding the grayscale image

How can I detect basic 2D geometric shapes (e.g. square, triangle, circle) on a JPEG image?

不羁岁月 提交于 2019-12-03 12:32:21
问题 After taking a picture, I'm trying to detect the shape of the object that is shot. What I'm looking for is similar to face detection, except I want the app to detect shapes instead of faces. I'm creating an Android app using Java and the android SDK. Any Ideas on what libraries or resources I can access to do this sort of thing? 回答1: I'd use the edge detection filter in marvin processing. http://marvinproject.sourceforge.net/en/plugins/edgeDetector.html Then go through the pixels, seach for

Rectangle shape with two solid colors

我们两清 提交于 2019-12-03 12:09:46
I'd like to create a rectangle shape with two solid colors (horizontally) to achieve something like this: I heard about layer-list , i though i could use it to contains two rectangle with a different color but it seems that it only lays shapes vertically. Is there a way to achieve this using lalyer-list or should i use something totally different? I'd like to keep it simple with ability to change the shape colors at runtime. Thanks. You can create custom drawable for this. Just extend Drawable class. Here is a sample code which draws a rectangle like you wanted, you can provide any number of

What is dimension order of numpy shape for image data?

Deadly 提交于 2019-12-03 11:30:01
I am using nibabel lib to load data from nii file. I read the document of the lib at http://nipy.org/nibabel/gettingstarted.html , and found that This information is available without the need to load anything of the main image data into the memory. Of course there is also access to the image data as a NumPy array This is my code to load the data and it shapes import nibabel as nib img = nib.load('example.nii') data = img.get_data() data = np.squeeze(data) data = np.copy(data, order="C") print data.shape I got the result 128, 128, 64 What is order of data shape? Is it WidthxHeightxDepth ? And