graphics

How to read image file and display on screen in windows tasm dosbox

社会主义新天地 提交于 2019-12-17 20:42:53
问题 Im currently learning graphical programming in tasm using dosbox. Ive been using a bunch of loops to draw square blocks of pixels and its really hard. I want to know if theres a way to read an image and display it. I know how to read a txt file maybe this is a start. Pls help 回答1: You need to write/use image loader or use your own image file format. BMP may look simple but has too much in it like compression pixel formats etc but you still can focus on a specific type of BMP and ignore all

How come my drawing code keeps resulting in fuzzy shapes?

六眼飞鱼酱① 提交于 2019-12-17 20:42:28
问题 No matter what I do, I can't seem to figure out why my images keep coming out fuzzy on iOS displays. It doesn't matter whether it's one I created in an image editor or drawing code, but I figured that code would make the issue much easier to parse. I know that if the line is 1 pixel wide, it'll appear fuzzy, but I tried multiple line width sizes with similar results. What can I do to make sure my graphics look sharp? UIGraphicsBeginImageContext(CGSizeMake(1000, 1000)); UIBezierPath *bezier =

How can I draw a border with squared corners in wpf?

不想你离开。 提交于 2019-12-17 20:27:30
问题 You know, like Battlestar paper! I have given this a few goes but now I'm stumped. I haven't yet gone down the geometery route, so I'll explain this as best as I can. I'd like the border to be sizable, but contain fixed-size corners, just like CornerRadius does. Instead of rounded corners, I'd like them to be tapered, like: /---------\ | | | | \_________/ I've done two attempts at this: My first attempt attempts to manipulate a border class. This just doesn't work, as stretching the shape

Draw an Arrow on a Picturebox in C# [closed]

自作多情 提交于 2019-12-17 20:01:33
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I want to be able to draw a straight arrow from one mouse click location to another, as if you were doing it in PowerPoint. It needs to be able to draw on a PictureBox as well. 回答1: Here is some basic code to draw lines in a picturebox from mouse down to current location. You just

Increasing Resolution and Reducing Size of an Image in Java

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-17 19:36:59
问题 When I first asked this, I included as much information as I could, since I never know what will help someone if they can give m a solution, but from the answers, it seems I didn't make my point clear. I'm leaving the original text at the bottom and shortening this. I hope that makes it clear. I am working with images returned to me from another program. I can get an image that's, for example, 8x10 at 72 DPI or the same image at 16x20, also at 72DPI. I'm working in Java. What I'd like to do

How to draw graphics/text on top of another application

大憨熊 提交于 2019-12-17 19:24:38
问题 I want to enhance an application, but there is no 3:e party API available. So basically the idea is to draw graphics/text on top of the applications windows. There are problems with z order, clipping, and directing mouse clicks either to my application or the other application. What is an elegant way of doing this? Example image here. It is a trading application where my application wants to add extra information into the trading application's windows. [URL=http://img104.imageshack.us/my.php

Ubuntu 14.04 how to install cuda 6.5 without installing nvidia driver

喜夏-厌秋 提交于 2019-12-17 19:24:07
问题 I am working on workstation with CPU core I7 4790 and two GPUs GTX 760 4 GB ram/1152 core the system's memory is 16 GB RAM I have Ubuntu 14.04.1 LTS after many tries and reinstalling Ubuntu many times finally i have correctly installed nvidia driver 340.46 using 3 shell commands ppa xorg-edgers now i want to install Cuda 6.5 toolkit but in the manual they say that the cuda toolkit installer will also install nvidia Graphics driver how to prevent the installer from reinstall the graphics

c# How to make smooth arc region using graphics path

非 Y 不嫁゛ 提交于 2019-12-17 19:10:55
问题 I'm trying to make a label control with rounded sides. Here is my code in OnPaint() overridden method in myclass inherited from Label. protected override void OnPaint(PaintEventArgs e) { e.Graphics.InterpolationMode = InterpolationMode.HighQualityBilinear; e.Graphics.CompositingQuality = CompositingQuality.HighQuality; e.Graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; e.Graphics.SmoothingMode = SmoothingMode.AntiAlias; LinearGradientBrush brush = new LinearGradientBrush(this

Creating new shape palettes in ggplot2 and other R graphics

爷,独闯天下 提交于 2019-12-17 19:04:55
问题 I'd like to specify my own shape palettes for ggplot2 at least as a vector for input into scale_shape_manual . I really like the paired shapes palette from JMP, but noticed R doesn't have some of these shapes. In particular, sideways triangles (e.g. |> or <| ) or a filled upside down triangle (e.g. \/ ) are missing. Are these available anywhere? If not, how can I specify these extra shapes and is there a way to get ggplot2 to use them in plots? 回答1: You can create your own shape palette by

How to convert array of bytes into Image in Java SE

偶尔善良 提交于 2019-12-17 19:01:54
问题 What is the right way to convert raw array of bytes into Image in Java SE. array consist of bytes, where each three bytes represent one pixel, with each byte for corresponding RGB component. Can anybody suggest a code sample? Thanks, Mike 回答1: Assuming you know the height and width of the image. BufferedImage img=new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); for(int r=0; r<height; r++) for(int c=0; c<width; c++) { int index=r*width+c; int red=colors[index] & 0xFF; int green