EFileTahi-A
Avatar/Signature-
Posts
633 -
Joined
-
Last visited
Personal Information
-
Occupation
VB6 and C# Programmer
-
Visual Studio .NET Version
Visual Studio .NET Professional
-
.NET Preferred Language
C#
EFileTahi-A's Achievements
Newbie (1/14)
0
Reputation
-
This function is not fully working
EFileTahi-A replied to EFileTahi-A's topic in Graphics and Multimedia
Wow, at has been a long time! For some reason, I cannot make this function work properly when image B is a PNG -- I was experimenting my PNG's transparency (a black gradient with 100% black opacity on the left reaching 0% on the right most) over a BMP. Any ideas? -
I'm desperate. Isometric Coordinates Translation
EFileTahi-A replied to EFileTahi-A's topic in Graphics and Multimedia
I have implemented it quite easily. :D Alright! I finally can add input into my ship design editor. Promise me you will never die and that you always will be around. :) PS: Remember Snarfblam, I'll also be around by the day you decide to team up with me. I have some great stuff going on atm. -
I'm desperate. Isometric Coordinates Translation
EFileTahi-A replied to EFileTahi-A's topic in Graphics and Multimedia
I get very excited every time I see your nickname In my threads, because your posts always hit the bull's eye! Can't wait to get home to try your idea. Thank you Snarfblam, I was getting seriously desperate with this thing. I really hope some day I have the opportunity to reward you. I will post again soon. -
After browsing the web and reading dozens of examples and tutorials I still can't figure out how to translate mouse X;Y screen position in pixels to X;Y isometric tile index. All the examples I tried returned strange values. The attached picture shows exactly the tiles' redering order. The Zig-Zag rendering mode was so simple to implement with the help of a colored coded tile. But this diamond shapped design is really giving me a hard time. I guess the formula involves the following variables: - MousePos.X - MousePos.Y - TileWidth - TileHeight - ScreenWidth - ScreenHeight Now I just need to know how to put the pieces together. Unfortunately, I fail to see the logic behind it. Thank you very much for any possible help.
-
Forcing windows font system size to 100%
EFileTahi-A replied to EFileTahi-A's topic in Windows Forms
Well, I didn't find the time to look into it during the weekend and to be honest, I will leave this issue for last as it is the least of my concerns now now. -
Forcing windows font system size to 100%
EFileTahi-A replied to EFileTahi-A's topic in Windows Forms
The text still scales :( What I plan to do is to detect the scale size set by Windows to let my app do the scaling by itself (manually). This way I can decide which controls can have their text scalde without compromising their functionality. Some will, others won't scale at all. I will try to do it this weekend. This requires time because the moment I change the font scale above 100% my .NET project will be immediately scaled messing up all my forms in the designer view. I will need to work over a backup of my project until I get it right. I hope I can post a solution here afterwards. -
Forcing windows font system size to 100%
EFileTahi-A replied to EFileTahi-A's topic in Windows Forms
I understand that letting the system handling it can, in most cases, be the best approach and that it should be considered seriously, but it sure doesn't make it a golden rule. Just because I'm using .NET controls (which are actually custom made controls) it doesn't mean they have to be exposed to changes from an outside source to behave like a common form. In this case, this is not about what the user wants / needs, this is about what the app needs in order to function right; in order to actually function. It is like requesting the user to have a DX11 card to run a DX11 game or having a VGA capable screen to run Windows XP. There are many reasons that can led a user to cease using a certain application. Believe me, text size it is not among them. Even those near me that use their small 7 inch netbooks have their text set to 100%. I never had a discussion in my life with anyone regarding a piece of software having the text font set to 9 instead 8. My app cannot be scaled. If it does, text won't fit because there isn't room for controls to scale. Thanks -
How can I ignore window's font size scale settings? Because if the font size is set to 125% or above my app will be completely wasted as dozens of controls will overlap and text itself will be cut in 90% of the cases. Not to mention that one of my forms got destroyed when I opened it in my new Notebook which had the font size set to 125%. I had to reposition every damn control on that form when I set the font size back to 100%. So, how can I completely bypass window's auto font scale size? (The correct way to see it) I understand that I shouldn't override the user's chosen settings in windows, but I have no other way to let my custom controls function properly as everything is measured using pixel precision. (My way to see it) My app, my rules. Don't like it? Don't use it. Anyway, I understand I need to set control scale to none but I'm not sure how to stop text from scaling. Thanks.
-
And proof of that is that my ASP .NET sessions consist of 85% Googling and 15% actually coding. I just wish it could be the opposite.
-
Oh, I thought it was just me. I'm glad to know I'm not the only one thinking likewise. Don't give up Adam! Please tell me the same! lol
-
Just started with ASP .NET this Saturday and it was the most frustrating experience I ever had. I went to bed Saturday, completely demoralized with the feeling that I had never coded on my life. Really frustrating... Anyway, after 2 full days of bumping the head I managed to setup the website's main structure, I'm now struggling on how to achieve these basic things (well I guess point 3 is not that basic): 1 - How can I make the DIV's height fill the browser's available space? I know that setting the DIV to 100% means it will re-size of the div based on the controls within it. So, do I need to code it? How can I get the webpage's height to compute the DIV's height? Will I also need to create an event for that? 2 - I need to maintain selected a menu item in the ASP Menu Navigation control when the user opens a new page through it. I need to do this with CSS since I learned that this option: 'IncludeStyleBlock = false' should be set to true. Unfortunately if I set it to true I will loose the 'special' format that the CSS sets it to work with, because I need an extra horizontal space so that text don't get too close for each menu item. 3 - To handle a login / session on an ASP website do I need to use a database to handle all users? I don't have a clue how the login works in ASP so, if someone can point me to a good example I will really appreciate it. Web developing is really strange. Seriously, it is a mess, chunks of code in multi languages with most control settings requiring being done in CSS. So much for "visual development". I haven't still figured it out how C# will actually do anything in ASP .NET. I hope to get there soon, once I set up the website's skeleton.
-
This function is not fully working
EFileTahi-A replied to EFileTahi-A's topic in Graphics and Multimedia
Thanks to you both, I finally managed to understand how the whole thing works! This will be so cool in future! I think this way I can actually replace most of my GDI+ rendering procedures with pointers*. I'm still amazed by its speed! It is instantaneously! Too bad I still need to use the DrawImageUnscaled() to draw the backbuffer to avoid flickering. Nonetheless it's still be awesome! :D -
Can someone please try to figure out what is happening here? I'm trying to apply the Multiply filter, similar to the one Photoshop uses by crossing the RGB values between two images. I'm not a pointer* guy at all and most of the code was taken from internet so I can't really say what is wrong. The function is currently working partially, that is, it applies the filter only over a third of the image from top to bottom on the left side. private void button2_Click(object sender, EventArgs e) { Bitmap srcA = (Bitmap)this.lbl_map.Image; Bitmap srcB = (Bitmap)this.lbl_paper.Image; BitmapData dataA = SetImageToProcess(srcA, new Rectangle(0, 0, 1280, 800)); BitmapData dataB = SetImageToProcess(srcB, new Rectangle(0, 0, 1280, 800)); int width = dataA.Width; int height = dataA.Height; int offset = dataA.Stride - width; unsafe { byte* ptrA = (byte*)dataA.Scan0; byte* ptrB = (byte*)dataB.Scan0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++, ++ptrA, ++ptrB) { int result = (ptrB[0] * ptrA[0]) / 255; ptrA[0] = (byte)result > (byte)255 ? (byte)255 : (byte)result; } ptrA += offset; ptrB += offset; } } srcA.UnlockBits(dataA); srcB.UnlockBits(dataB); this.BackgroundImage = srcA; } static public BitmapData SetImageToProcess(Bitmap image, Rectangle roi) { if (image != null) return image.LockBits( roi, ImageLockMode.ReadWrite, image.PixelFormat); return null; } I really wish I could understand a bit more of how this function actually works. The filter seems to play instantaneously against the 10sec it takes doing it with GDI+. Thanks
-
Hmm... Well, lets wait and see. Thanks for mentioning it. Assembly; now that's what I call doing it the hard way. I wonder what would be the result if you put such passionate effort towards something done in a easier language but yet quite complex :D I'm going to send you a private message so you can read about my project.
-
Hey Snarfblam! Thanks for posting. Well, that would be my next question, that is, if we could develop .NET for ARM devices. Nice. But will mobile .NET apps require a special Mobile type project in visual studio or we can use standard VS projects? I'm in imminence of selling my Asus Transformer TF101 to get a surface device, mainly because I will be able to use my C# knowledge to quickly build .NET apps for it. PS: How busy are you now? I still have hope that some day we might develop something together. I've returned to my old fantasy roguelike RPG project which is something... well... never seen before... ;) I could post a link to its secret URL in case you are interested. :D