Adds the pixmap to the list for this slider.
        
        :param      pixmap | <QPixmap> || <str>
505208
def addPixmap(self, pixmap):
        
        scene = self.scene()
        scene.addItem(XImageItem(pixmap))
        self.recalculate()
933200
def set_pixels(self, pixel_list):
        

        if len(pixel_list) != 64:
            raise ValueError('Pixel lists must have 64 elements')

        for index, pix in enumerate(pixel_list):
            if len(pix) != 3:
                raise ValueError('Pixel at index %d is invalid. Pixels must contain 3 elements: Red, Green and Blue' % index)

            for element in pix:
                if element > 255 or element < 0:
                    raise ValueError('Pixel at index %d is invalid. Pixel elements must be between 0 and 255' % index)

        with open(self._fb_device, 'wb') as f:
            map = self._pix_map[self._rotation]
            for index, pix in enumerate(pixel_list):
                # Two bytes per pixel in fb memory, 16 bit RGB565
                f.seek(map[index // 8][index % 8] * 2)  # row, column
                f.write(self._pack_bin(pix))
400094
def getPixmap(self, matrix=None, colorspace=None, alpha=0, clip=None):
        """"""
        return _fitz.DisplayList_getPixmap(self, matrix, colorspace, alpha, clip)
601578
def add(dcm)
      raise ArgumentError, "Invalid argument 'dcm'. Expected DObject, got #{dcm.class}." unless dcm.is_a?(DICOM::DObject)
      @dcm = dcm
      self.scaling = dcm.value(DOSE_GRID_SCALING)
      pixels = dcm.narray
      rows = dcm.value(ROWS)
      cols = dcm.value(COLUMNS)
      image_position = dcm.value(IMAGE_POSITION).split("\\")
      pos_x = image_position[0].to_f
      pos_y = image_position[1].to_f
      frame_origin = image_position[2].to_f
      cosines = dcm.value(IMAGE_ORIENTATION).split("\\").collect {|val| val.to_f} if dcm.value(IMAGE_ORIENTATION)
      spacing = dcm.value(SPACING).split("\\")
      col_spacing = spacing[1].to_f
      row_spacing = spacing[0].to_f
      nr_frames = dcm.value(NR_FRAMES).to_i
      frame_offsets = dcm.value(GRID_FRAME_OFFSETS).split("\\").collect {|value| value.to_f}
      sop_uids = RTKIT.sop_uids(nr_frames)
      # Iterate each frame and create dose images:
      nr_frames.times do |i|
        # Create an Image instance (using an arbitrary UID, as individual dose frames don't really have UIDs in DICOM):
        img = SliceImage.new(sop_uids[i], frame_origin + frame_offsets[i], self)
        # Fill in image information:
        img.columns = cols
        img.rows = rows
        img.pos_x = pos_x
        img.pos_y = pos_y
        img.col_spacing = col_spacing
        img.row_spacing = row_spacing
        img.cosines = cosines
        # Fill in the pixel frame data:
        img.narray = pixels[i, true, true]
      end
    end
1211637
def add_slide(self, slide_layout):
        
        partname = self._next_slide_partname
        slide_layout_part = slide_layout.part
        slide_part = SlidePart.new(partname, self.package, slide_layout_part)
        rId = self.relate_to(slide_part, RT.SLIDE)
        return rId, slide_part.slide
528040
def paintEvent(self, event):
        
        super(IconLineEdit, self).paintEvent(event)
        painter = QPainter(self)

        rect = self.geometry()
        space = int((rect.height())/6)
        h = rect.height() - space
        w = rect.width() - h

        if self._icon_visible:
            if self._status and self._status_set:
                pixmap = self._set_icon.pixmap(h, h)
            elif self._status:
                pixmap = self._valid_icon.pixmap(h, h)
            else:
                pixmap = self._invalid_icon.pixmap(h, h)

            painter.drawPixmap(w, space, pixmap)

        application_style = QApplication.style().objectName()
        if self._application_style != application_style:
            self._application_style = application_style
            self._refresh()

        # Small hack to gurantee correct padding on Spyder start
        if self._paint_count < 5:
            self._paint_count += 1
            self._refresh()
483000
def setMaximumPixmapSize(self, size):
        
        self._maximumPixmapSize = size
        position = self.position()
        self._position = None
        self.setPosition(position)
174636
def add_uploads(self, filemap):
        
        [self.add_upload(k, v) for k, v in filemap.iteritems()]
708416
def draw_image(pixelmap, img):
    ''''''
    for item in pixelmap:
        color = item[2]

        # Access the rectangle edges.
        pixelbox = (item[0][0], item[0][1], item[1][0], item[1][1])
        draw = ImageDraw.Draw(img)
        draw.rectangle(pixelbox, fill=color)
303935
def AddTripDecoration(self, triplist, color="#f00"):
    
    tmpstr = self._DrawTrips(triplist,color)
    self._decorators.append(tmpstr)
231266
def active_pixmap(self, value):
        

        if value is not None:
            assert type(value) is QPixmap, "'{0}' attribute: '{1}' type is not 'QPixmap'!".format(
                "active_pixmap", value)
        self.__active_pixmap = value
1156029
def paintEvent(self, event):
        
        pixmap = self.currentPixmap()
        rect   = self.currentPixmapRect()
        
        with XPainter(self) as painter:
            painter.drawPixmap(rect.x(), rect.y(), pixmap)
1350468
def add_menu(self, menu):
        ''''''
        from MAVProxy.modules.mavproxy_map import mp_slipmap
        self.default_popup.add(menu)
        self.map.add_object(mp_slipmap.SlipDefaultPopup(self.default_popup, combine=True))
1234388
public void generatePixels( HashSet<Point> pix ) {
        // Reset all pixels to background
        for( int j = 0; j < height; ++j ) {
            for( int i = 0; i < width; ++i ) {
                pixels[i][j] = BACKGROUND;
            }
        }
        convertToPixels(pix);
    }
676191
def add_map(self, event, handle, *args):
        

        item = self.base.setdefault(event, list())
        item.append((handle, args))
844742
def add_downloads(self, filemap):
        
        [self.add_download(k, v) for k, v in filemap.iteritems()]
182330
def add_image(self, im):
        
        for im_tmp in self.images:
            if im_tmp.kind == im.kind:
                self.images.remove(im_tmp)
                break
        self.images.append(im)