Search Results

Search found 247 results on 10 pages for 'aliasing'.

Page 7/10 | < Previous Page | 3 4 5 6 7 8 9 10  | Next Page >

  • How to extend WPF hit testing zone for a Path object.

    - by user275587
    Wpf hit testing is pretty good but the only method I found to extend the hit zone is to put a transparent padding area around your object. I can't find any method to add a transparent area arround a Path object. The path is very thin and I would like to enable hit testing if the user clicks near the path. I can't find any method to extend the path object with a transparent area like the image below : I tried to used a partially transparent stroke brush but I ran into the problem described here : http://stackoverflow.com/questions/1412833/how-can-i-draw-a-soft-line-in-wpf-presumably-using-a-lineargradientbrush I also tried to put an adorner over my line but because of WPF anti-aliasing algorithms, the position is way off when I zoom in my canvas and interfere with other objects hit-testing in a bad way. Any suggestion to extend the hit testing zone would be highly appreciated. Thanks, Kumar

    Read the article

  • Flash CS5 and dynamic textfields

    - by hood
    I have a "shell" that started life in Flash CS3 (Flash 9, AS3) that has been since used with CS4 and now CS5. It creates TextFields in ActionScript for display (reading the content of those fields from XML). The text fields are either Myriad Pro Regular or Myriad Pro Semibold, both are embedded in the SWF from the Library (any given text field will only use one of those fonts) and using Advanced anti-aliasing. Once a FLA goes into CS5 is still has the same problem when saved back into CS4. The problem is the spacing between letters are now quite random, and the width of each text field is too wide (by about 10%). Changing the letterSpacing property (to something negative) makes this more noticeable. I read on here about Font.registerFont(MyriadPro) but that doesn't seem to be doing anything. Does anyone know how to make CS5 behave like previous versions of Flash? I'm using Flash Professional on Snow Leopard (as part of CS5 Web Premium).

    Read the article

  • How do I prevent jagged edges alongside the surfaces of my 3d model?

    - by badcodenotreat
    Lets say I've implemented in openGL a crude model viewer with shading which renders a series of blocks, such that I have something that looks like this. http://i.imgur.com/TsF7K.jpg Whenever I rotate my model to the side, it causes an unwanted jagged effect along any surface with a steep viewing angle. http://i.imgur.com/Bgl9o.jpg I'm pretty sure this is due to the polygon offset I used to prevent z-fighting between the model and the wireframe, however I'm not able to find the factor/unit parameters in openGL which prevent this unwanted effect. what are the best values of factor and unit for glPolygonOffset to prevent this? would implementing anti-aliasing alleviate the problem? is the trade off in performance trivial/significant? is this perhaps a shading issue? should i try a solution along this line of thought?

    Read the article

  • How do I draw a proper parallelogram that can be animated on iPhone?

    - by Robert Kosara
    I'm trying to do something very simple: I need some parallelograms in my program. These are attached to other objects, all of which are UIViews. It's important that I be able to animate these, since the objects they are attached to can also be animated. I've figured out how to use the transform in UIView/CALayer to do this, but the problem is that these sheared UIViews don't look very nice: there is no anti-aliasing of the edges. Is there some other way to do this? I would like to use UIViews, since I also use them for user interaction and animation is so much easier than drawing by hand. I don't want to use OpenGL for this.

    Read the article

  • How do I replace colours in a movieclip?

    - by Oli
    I am trying to take a movieclip of a character and change the colour of their clothes. The character is comprised of vectors. So far I have semi-sucessfully used this method: stop the movieclip take the bitmap data from the current frame use threshold to replace the colour store the resulting bitmap data in an array add an onenterframe function - clear the current frame and add the bitmap data from the processed data in the array So - this works pretty well. Each frame is only processed once at the beginning and then the write to the movieclip is very quick. However! As the replacement is being performed on a bitmap there is an amount of aliasing that takes place to remove jaggies/pixelation. This produces colours that are not matched using threshold. So the main colour is replaced correctly but it is surrounded by a halo of mixed colours :( I am sure there should be a better way to do this. Any ideas or answers would be greatly apreciated - Thanks.

    Read the article

  • PDF Disable Anti-alias on Lines

    - by Travis
    I'm creating a dynamically generated PDF using FPDF. My PDF requires many exactly horizontal/vertical lines in a grid and when rendered they are anti-aliased and look very fuzzy and unacceptable to the client. I need to remove the anti-aliasing for these(or all) lines in the doc. I know this is possible because it's shown correctly in the adobe pdf specs itself http://www.adobe.com/devnet/acrobat/pdfs/PDF32000_2008.pdf (warning: big file) see the box in page 2 for how this should look. How would I duplicate the box shown on this page?

    Read the article

  • Python: undefined reference to `_imp __Py_InitModule4'

    - by Mark
    I'm trying to do a debug build of the Rabbyt library using mingw's gcc to run with my MSVC built python26_d.. I got a lot of undefined references which caused me to create libpython26_d.a, however one of the undefined references remains. Googling gives me: http://www.techlists.org/archives/programming/pythonlist/2003-03/msg01035.shtml But -rdynamic doesn't help. e:\MinGW/bin\gcc.exe -mno-cygwin -mdll -O -Wall -g -IE:\code\python\python\py26\ include -IE:\code\python\python\py26\PC -c rabbyt/rabbyt._rabbyt.c -o build\temp .win32-2.6-pydebug\Debug\rabbyt\rabbyt._rabbyt.o -O3 -fno-strict-aliasing rabbyt/rabbyt._rabbyt.c:1351: warning: '__Pyx_SetItemInt' defined but not used writing build\temp.win32-2.6-pydebug\Debug\rabbyt\_rabbyt_d.def e:\MinGW/bin\gcc.exe -mno-cygwin -shared -g build\temp.win32-2.6-pydebug\Debug\r abbyt\rabbyt._rabbyt.o build\temp.win32-2.6-pydebug\Debug\rabbyt\_rabbyt_d.def - LE:\code\python\python\py26\libs -LE:\code\python\python\py26\PCbuild -lopengl32 -lglu32 -lpython26_d -lmsvcr90 -o build\lib.win32-2.6-pydebug\rabbyt\_rabbyt_d. pyd build\temp.win32-2.6-pydebug\Debug\rabbyt\rabbyt._rabbyt.o: In function `init_ra bbyt': E:/code/python/rabbyt/rabbyt/rabbyt._rabbyt.c:1121: undefined reference to `_imp __Py_InitModule4'

    Read the article

  • mod_wsgi | linux installation error

    - by MMRUser
    I'm getting the following error when I try to install mod_wsgi ./configure checking for apxs2... no checking for apxs... /usr/sbin/apxs checking Apache version... 2.2.3 configure: creating ./config.status config.status: creating Makefile make /usr/sbin/apxs -c -I/usr/local/include/python2.6 -DNDEBUG mod_wsgi.c -L/usr/local/lib -L/usr/local/lib/python2.6/config -lpython2.6 -lpthread -ldl -lutil -lm /apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fno-strict-aliasing -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/local/include/python2.6 -DNDEBUG -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo sh: /apr-1/build/libtool: No such file or directory apxs:Error: Command failed with rc=8323072 . make: *** [mod_wsgi.la] Error 1 libtool is installed on my system.. mod_wsgi 3.2 *Apache 2.2* *Python 2.6*

    Read the article

  • Diagonal Wedge Shaped CSS - Edge to Edge Centered in Browser

    - by Varazi
    I have been trying to make this shape in CSS. Ideally it will span the entire length of the browser window and probably extend outside the field of view to support larger screens and also be centered so that the angle does not change. Anyone have any solutions? Also I think I might run into a problem of the angle aliasing harshly. I might need to resort to using an image. Would like to use CSS though. ** Image Spelling Error. (Indefinitely not Inevitably)

    Read the article

  • Replacing a colour/colours in a movieclip with different colours?

    - by Oli
    I am trying to take a movieclip of a character and change the colour of their clothes. The character is comprised of vectors. So far I have semi-sucessfully used this method: stop the movieclip take the bitmap data from the current frame use threshold to replace the colour store the resulting bitmap data in an array add an onenterframe function - clear the current frame and add the bitmap data from the processed data in the array So - this works pretty well. Each frame is only processed once at the beginning and then the write to the movieclip is very quick. However! As the replacement is being performed on a bitmap there is an amount of aliasing that takes place to remove jaggies/pixelation. This produces colours that are not matched using threshold. So the main colour is replaced correctly but it is surrounded by a halo of mixed colours :( I am sure there should be a better way to do this. Any ideas or answers would be greatly apreciated - Thanks.

    Read the article

  • CentOS: revert python version back to original

    - by NP
    Hi all, I installed python 2.6 using the instructions here on CentOS 5.4. However I realized it was a bad move and I need to revert back to 2.4, which was there originally. Can anyone guide me on how to undo what I did here? In particular, I am not sure how to undo this: Configure ld to find your shared libs: $ cat /etc/ld.so.conf.d/opt-python2.5.conf /opt/python2.5/lib (hit enter) (hit ctrl-d to return to shell) $ ldconfig I tried removing the alias and the symlink and even re-aliasing python to /usr/bin/python, but when I try to install an RPM i get this error: error: Failed dependencies: libpython2.4.so.1.0 is needed by ... Thanks in advance.

    Read the article

  • Why can't I install psycopg2? (Python 2.6.4, PostgreSQL 8.4, OS X 10.6)

    - by cojadate
    After running python setup.py install I get the following: Warning: Unable to find 'pg_config' filebuilding 'psycopg2._psycopg' extension gcc-4.0 -arch ppc -arch i386 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 - DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.2.1 (dt dec ext pq3)" -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -DHAVE_PQPROTOCOL3=1 -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -I. -c psycopg/psycopgmodule.c -o build/temp.macosx-10.3-fat-2.6/psycopg/psycopgmodule.o unable to execute gcc-4.0: No such file or directory error: command 'gcc-4.0' failed with exit status 1 There's probably something screamingly obvious there to anyone who knows the first thing about back-end web programming, but unfortunately it's all gobbledegook to me. The psycopg2 documentation was not helpful.

    Read the article

  • Swap bits in c++ for a double

    - by hidayat
    Im trying to change from big endian to little endian on a double. One way to go is to use double val, tmp = 5.55; ((unsigned int *)&val)[0] = ntohl(((unsigned int *)&tmp)[1]); ((unsigned int *)&val)[1] = ntohl(((unsigned int *)&tmp)[0]); But then I get a warning: "dereferencing type-punned pointer will break strict-aliasing rules" and I dont want to turn this warning off. Another way to go is: #define ntohll(x) ( ( (uint64_t)(ntohl( (uint32_t)((x << 32) >> 32) )) << 32) | ntohl( ((uint32_t)(x >> 32)) ) ) val = (double)bswap_64(unsigned long long(tmp)); //or val = (double)ntohll(unsigned long long(tmp)); But then a lose the decimals. Anyone know a good way to swap the bits on a double without using a for loop?

    Read the article

  • Algorithm for calculating definite integrals with bounds at infinity

    - by mbac32768
    Suppose I have an integral that's bounded on one (or both) end by (-)infinity. AFAICT, I can't analytically solve this problem, it takes brute force (e.g. using a Left Riemann Sum). I'm having trouble generalizing the algorithm so that it sets the proper subdivisions; I'll either do far too much work to calculate something trivial, or not do nearly enough and have huge aliasing errors. Answering in any language is cool, but maybe someone with better google-fu can end this quickly. :) Is what I'm looking for as impossible as trying to measure the British coastline?

    Read the article

  • Using Alias in Apache ONLY if local directory not present?

    - by Andrew E.
    Hey all, We're running a reseller web host, and aliasing a particular directory for ALL the sites within. This is all happening through WHM/Cpanel, which could possibly complicate my question. We want all hosts to run their "/concrete" directory through a shared location on the server. This is working fine by adding "Alias /concrete/ "/usr/local/share/concrete5/concrete-latest/concrete/" to the apache include editor in WHM. However, if a local concrete/ directory exists within the particular webroot of the virtual host, we'd rather use that than "/concrete" globally. It would also be nice if we could make this alias change in the context of the virtual host, within WHM (and I haven't found a great way to modify virtual host sections in WHM without hacking a file that I don't believe we're supposed to hack.) Thoughts?

    Read the article

  • Mono Ignores Graphics.InterpolationMode?

    - by Timothy Baldridge
    I have a program that draws some vector graphics using System.Drawing and the Graphics class. The anti-aliasing works, kindof okay, but for my need I neede oversampling, so I create the starting image to be n times larger and then scale back the final image by n. On Window and .NET the resulting image looks great! However, on Mono 2.4.2.3 (Ubuntu 9.10 stock install), the intropolation is horrible. Here's how I'm scaling my images: Bitmap bmp = new Bitmap(Bmp.Width / OverSampling, Bmp.Height / OverSampling); Graphics g = Graphics.FromImage(bmp); g.InterpolationMode = InterpolationMode.HighQualityBicubic; g.DrawImage(Bmp, 0, 0, bmp.Width, bmp.Height); g.Dispose(); From what I can tell there is no interpolation happening at all. Any ideas?

    Read the article

  • retrieve columns from sqlite3

    - by John Smith
    I have two tables in sqlite: CREATE TABLE fruit ('fid' integer, 'name' text); CREATE TABLE basket ('fid1' integer, 'fid2' integer, 'c1' integer, 'c2' integer); basket is supposed to have count c1 of fruit fid1 and c2 of fruit fid2 I created a view fruitbasket; create view fruitbasket as select * from basket inner join fruit a on a.fid=basket.fid1 inner join fruit b on b.fid=basket.fid2; it works (almost) as expected. When I type pragma table_info(fruitbasket); I get the following output 0|fid1|integer|0||0 1|fid2|integer|0||0 2|c1|integer|0||0 3|c2|integer|0||0 4|fid|integer|0||0 5|name|text|0||0 6|fid:1|integer|0||0 7|name:1|text|0||0 The problem is that I cannot seem to SELECT name:1. How can I do it other than going back and re-aliasing the columns?

    Read the article

  • What are good resources for computer graphics basics?

    - by Hanno Fietz
    During Flex programming, I recently ran into several questions (about box models, ways to join lines and misaligning pixels [on doctype]) regarding computer graphics and layout, where I felt that I lacked some basic background on things like concepts like the box model approaches mapping real numbers to a pixel raster (like font anti-aliasing) conventions found across drawing engines, like do you count y coordinates from top or bottom, and why I feel that reading some basic Wikipedia articles, books or tutorials on these subjects might help in phrasing my questions more specifically and debugging my code more systematically. I have repeatedly found myself writing tiny test apps in Flex, just to find out how the APIs do very basic stuff. My assumption would be that if I knew the right vocabulary and some general concepts, I could solve these questions much faster.

    Read the article

  • Care to be taken when serving static content (JS, CSS, Media) from different domain?

    - by Aahan Krish
    Let me try to explain by example. Say website is hosted at example.com (NOT www.example.com). In order to serve static content cookie-free, I've chosen to use a different domain example-static.com. Now, lets consider that my static content is currently served like this: http://example.com/js/script.js http://example.com/css/style.css http://example.com/media/image.jpg ** Now I create a CNAME record aliasing example-static.com to my main domain i.e. example.com so that the static content is served as such: http://example-static.com/js/script.js http://example-static.com/css/style.css http://example-static.com/media/image.jpg ** Is that all I have to do? Will all browsers execute JavaScript files and load web fonts without any security concerns? OR should I be using some .htaccess rules to modify header information and the like? PS: It would be great if you can provide what rules should be added, if need be.

    Read the article

  • Algorithm for calculating indefinite integrals

    - by mbac32768
    Suppose I have an integral that's bounded on one (or both) ends by (-)infinity. AFAICT, I can't analytically solve this problem, it takes brute force (e.g. using a Left Riemann Sum). I'm having trouble generalizing the algorithm so that it sets the proper subdivisions; I'll either do far too much work to calculate something trivial, or not do nearly enough and have huge aliasing errors. Answering in any language is cool, but maybe someone with better google-fu can end this quickly. :) Is what I'm looking for as impossible as trying to measure the British coastline?

    Read the article

  • Why did the C# designers attach three different meanings to the 'using' keyword?

    - by gWiz
    The using keyword has three disparate meanings: type/namespace aliasing namespace import syntactic sugar for ensuring Dispose is called The documentation calls the first two definitions directives (which I'm guessing means they are preprocessing in nature), while the last is a statement. Regardless of the fact that they are distinguished by their syntaxes, why would the language developers complicate the semantics of the keyword by attaching three different meanings to it? For example, (disclaimer: off the top of my head, there may certainly be better examples) why not add keywords like alias and import? Technical, theoretical, or historical reasons? Keyword quota? ;-) Contrived sample: import System.Timers; alias LiteTimer=System.Threading.Timer; alias WinForms=System.Windows.Forms; public class Sample { public void Action { var elapsed = false; using(var t = new LiteTimer.Timer(_ => elapsed = true) { while (!elapsed) CallSomeFinickyApi(); } } } "Using" is such a vague word.

    Read the article

  • Howto disable the emacs site-start files permanently?

    - by elemakil
    When solving this problem I figured out that I need to disable the site-wise init files in order to get my emacs + CEDET running (everything works nicely when starting emacs using emacs --no-site-file but is broken without the additional argument). I'd like to disable the site-wise init files permanently but as I'm using several different approaches/methods when launching emacs (launcher/panel/terminal) I don't think aliasing it in my .zshrc won't work. I require a method to permanently disable all site-start files. Is there any easy way to achieve this? Thanks!

    Read the article

  • that, self or me — which one to prefer in JavaScript?

    - by Török Gábor
    While coding JavaScript sometimes you store the reference of object this in a local variable for different purposes (to set proper scope, to help code obfuscators, etc.). There are coders who prefer aliasing this to that to make it obvious its intention. Other guys use self since it's pointing to the object itself. I even saw source codes where me held the reference and it still makes sense. Certainly there are other ones. Which one should I prefer? Is there a convention on which to use or is it only the matter of taste.

    Read the article

  • Silverlight Cream for April 08, 2010 -- #834

    - by Dave Campbell
    In this Issue: Michael Washington, Phil Middlemiss, Yochay Kiriaty, Giorgetti Alessandro, Mike Snow, John Papa, SilverLaw, smartyP, and Pete Brown. Shoutouts: Steve Wortham sent me a link to his RegEx tool that is written in Silverlight... definitely worth a look: Introducing Code Hinting for Regular Expressions Joshua Blake posted his MIX10 materials: MIX10 NUI session sample code From SilverlightCream.com: Silverlight MVVM: An (Overly) Simplified Explanation Michael Washington has a tutorial up for getting your arms (and head) around MVVM and Silverlight, and Blend too. A Chrome and Glass Theme - Part 3 Phil Middlemiss has part 3 up of his tutorial series on building an awesome theme for Silverlight... he's styling the textbox and checkbox this time around, and improving the button too Automatic Rotation Support or Automatic Multi-Orientation Layout Support for Windows Phone Yochay Kiriaty is giving up some WP7 goodness with his post on Multi-Orientation Layout Support ... yeah I had to say it twice myself :) good links and all the code in addition to the good blog post Silverlight Navigation Framework: resolve the pages using an IoC container Giorgetti Alessandro has some pretty cool code up as a proof of concept of using an IoC container with the Navigation Framework of Silverlight 4. Silverlight Tip of the Day No. 109 – Attach to Process Debugging Mike Snow is back doing Tips of the Day... and number 109 is showing how to attach the debugger to a running Silverlight app. Silverlight TV 20: Community Driven Development with WCF RIA Services In his latest Silverlight TV episode, John Papa talks with Jeff Handley about RIA Services, and how feedback from the community helped shape the product. ChildWindowMouseScrollResizeBehavior - Silverlight 3 SilverLaw has a new Behavior up at the Expression Gallery that gives you resizing on a ChildWindow using the Mouse Wheel. Creating a Windows Phone 7 Metro Style Pivot Application [Part 3] smartyP has the 3rd and final episode for his WP7 Pivot up, and this one includes not only the source but a video tutorial. Layout Rounding Pete Brown talks about Layout Rounding and it has nothing to do with rounding corners... it has to do with rounding off where your objects get placed pixel-wise ... I've blogged about this seemingly-anti-aliasing more than once... Pete has the real answer Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Compiling for T4

    - by Darryl Gove
    I've recently had quite a few queries about compiling for T4 based systems. So it's probably a good time to review what I consider to be the best practices. Always use the latest compiler. Being in the compiler team, this is bound to be something I'd recommend But the serious points are that (a) Every release the tools get better and better, so you are going to be much more effective using the latest release (b) Every release we improve the generated code, so you will see things get better (c) Old releases cannot know about new hardware. Always use optimisation. You should use at least -O to get some amount of optimisation. -xO4 is typically even better as this will add within-file inlining. Always generate debug information, using -g. This allows the tools to attribute information to lines of source. This is particularly important when profiling an application. The default target of -xtarget=generic is often sufficient. This setting is designed to produce a binary that runs well across all supported platforms. If the binary is going to be deployed on only a subset of architectures, then it is possible to produce a binary that only uses the instructions supported on these architectures, which may lead to some performance gains. I've previously discussed which chips support which architectures, and I'd recommend that you take a look at the chart that goes with the discussion. Crossfile optimisation (-xipo) can be very useful - particularly when the hot source code is distributed across multiple source files. If you're allowed to have something as geeky as favourite compiler optimisations, then this is mine! Profile feedback (-xprofile=[collect: | use:]) will help the compiler make the best code layout decisions, and is particularly effective with crossfile optimisations. But what makes this optimisation really useful is that codes that are dominated by branch instructions don't typically improve much with "traditional" compiler optimisation, but often do respond well to being built with profile feedback. The macro flag -fast aims to provide a one-stop "give me a fast application" flag. This usually gives a best performing binary, but with a few caveats. It assumes the build platform is also the deployment platform, it enables floating point optimisations, and it makes some relatively weak assumptions about pointer aliasing. It's worth investigating. SPARC64 processor, T3, and T4 implement floating point multiply accumulate instructions. These can substantially improve floating point performance. To generate them the compiler needs the flag -fma=fused and also needs an architecture that supports the instruction (at least -xarch=sparcfmaf). The most critical advise is that anyone doing performance work should profile their application. I cannot overstate how important it is to look at where the time is going in order to determine what can be done to improve it. I also presented at Oracle OpenWorld on this topic, so it might be helpful to review those slides.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10  | Next Page >