rectangles

Rounded rectangle in RDLC Report

烂漫一生 提交于 2019-12-12 01:45:42
问题 I have drawn rectangles and tables in my RDLC report. But I want to show rectangle's rounded corners and Black color of Table cell borders. Is there any way to do it? Or anyway I can use CSS styles in RDLC report elements? 回答1: You can try to use CSS on the elements. The ID of the ReportViewer Div is usually "1_" whatever the instance name is, meaning if you have something like: private void Page_Load(object sender, System.EventArgs e) { MyReportViewer.ShowBackButton = false; MyReportViewer

How to change MovieClip transparency based on mouse position?

别等时光非礼了梦想. 提交于 2019-12-12 00:07:07
问题 So, I'm trying to make a grid of rectangles each get more transparent the closer the mouse is to it. Using some basic maths, I thought I had got it, but instead it seems I got a weird graphic bug(maybe?) shown here: The middle of the rings is where the mouse is. Part of code that deals with transparency: private function update(e:Event = null):void { for (var i:int = 0; i < buttons.length; i++) { lightFact = getDistance(buttons[i]) lightBrightness = lightPower - (lightFact * 10) buttons[i]

Java, how to drawing rectangle variables on my screen

给你一囗甜甜゛ 提交于 2019-12-11 23:59:45
问题 I have coded a simple Java game where there are two rectangles on the screen, one of the rectangles moves and the other stays still, the moving Rectangle moves with keyboard arrow input and can move either up, down, left or right. The problem I am having is drawing my rectangles on the screen, I have my variables set up as shown: float buckyPositionX = 0; float buckyPositionY = 0; float shiftX = buckyPositionX + 320;//keeps user in the middle of the screem float shiftY = buckyPositionY + 160;

Translate/Detect Rectangle portion of Image from Resized Image

…衆ロ難τιáo~ 提交于 2019-12-11 23:21:01
问题 I have a Large size image.Since it takes long to process high res images i resize it keeping the aspect ratio.From the resized image i detect a rectangle and i have the coordinates of the rectangle. Bitmap ResizekeepAspectRatio(Bitmap imgPhoto, int Width, int Height) { int sourceWidth = imgPhoto.Width; int sourceHeight = imgPhoto.Height; int sourceX = 0; int sourceY = 0; int destX = 0; int destY = 0; float nPercent = 0; float nPercentW = 0; float nPercentH = 0; nPercentW = ((float)Width /

WinForms Draw, Then Move Rectangle

大兔子大兔子 提交于 2019-12-11 16:34:05
问题 I have a rectangle I am trying to draw in a WinForms project using C#. I am drawing the rectangle on the form's Paint event: private void onPaintHandler(object sender, PaintEventArgs e) { using (Pen pen = new Pen(Color.Black, 1)) { Brush brush = new SolidBrush(Color.Gray); e.Graphics.FillRectangle(brush, 0, this.Height - 100, this.Width, 100); e.Graphics.DrawRectangle(pen, -1, this.Height - 100, this.Width, 100); brush.Dispose(); pen.Dispose(); } } I am interested in being able to move the

Detecting incomplete rectangles (missing corners/ short endges) in OpenCV

五迷三道 提交于 2019-12-11 12:31:56
问题 I've been working off a variant of the opencv squares sample to detect rectangles. It's working fine for closed rectangles, but I was wondering what approaches I could take to detect rectangles that have openings ie missing corners, lines that are too short. I perform some dilation, which closes small gaps but not these larger ones. I considered using a convex hull or bounding rect to generate a contour for comparison but since the edges of the rectangle are disconnected, each would read as a

How to Rotate AWT rectangle in JAVA?

我的梦境 提交于 2019-12-11 12:03:17
问题 I am creating a small java 2D game and i want to know if there is any way to rotate AWT rectangle AffineTransform origXform = g2d.getTransform(); AffineTransform newXform = (AffineTransform) origXform.clone(); newXform.rotate(angle, pivotX, pivotY); // pivotX ,pivotY is the starting point of the hand image g2d.setTransform(newXform); Rectangle arm = new Rectangle(bowX + 5, bowY + 55, 60, 5); g2d.drawImage(playerBowReadyImg, bowX, bowY, null); //hand image on the above code i simply draw the

Fitting a rectangle inbetween existing, non-overlapping rectangles

谁说胖子不能爱 提交于 2019-12-11 11:58:36
问题 I have a problem that can perhaps best be illustrated with windows on a computer screen: create another window, as large as possible, not overlapping any of the existing windows. In other words: given a set of N rectangles on a finite surface (a sheet of paper, or a screen), find the largest rectangle that can be fitted inbetween these rectangles. (Coordinates can be arbitrary, so a bitmap is not a viable solution here.) The following photo shows three rectangles (in black) and the largest

Finding the set containing maximum empty rectangles for all the points in space

我与影子孤独终老i 提交于 2019-12-11 11:54:33
问题 Given a 2D space limited by a (white) rectangle and a set of (black) rectangles occupying that space I am looking for a way to somehow index the empty (white) space. For that purpose I would like to create a set of (white) rectangles such that for any given point in the space (point not belonging to any "black" rectangle) maximal empty rectangle exists in that resulting set of white rectangles. Thanks 回答1: Are you in a grid (i.e. an image) or in a continuous 2D space ? My answer is for the

Calculating the area and position of dynamically formed rectangles

血红的双手。 提交于 2019-12-11 09:33:30
问题 Hello stackoverflow community, I'm working on a puzzle game using Cocos2D/Box2D were the player draws lines on the screen. Depending on were the player draws, I want to then work out the area and position of the rectangles that appear as a result of the drawn lines. I've currently got an array of all lines in the game so I know their (x, y) positions and sizes but I'm at a lost as to how to calculate the area and Cartesian coordinates of the rectangles that are dynamically formed. To help